From 9564ced4561ed9149a6f463151ab4d91ddf304e2 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Sat, 8 Jan 2022 18:24:52 -0600 Subject: [PATCH] Bug fixing --- OneDriveSync | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OneDriveSync b/OneDriveSync index 3d6d025..d9a7800 100644 --- a/OneDriveSync +++ b/OneDriveSync @@ -7,7 +7,7 @@ if [ $(id -u) -eq 0 ]; then exec sudo -H -u $0 "$@" fi -function notify-send2() { +notify() { #Detect the name of the display in use local display=":$(ls /tmp/.X11-unix/* | sed 's#/tmp/.X11-unix/X##' | head -n 1)" @@ -20,6 +20,7 @@ function notify-send2() { sudo -u $user DISPLAY=$display DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$uid/bus notify-send -a rclone -h string:desktop-entry:alacritty "$@" } -notify-send2 "OneDrive sync" "Sync started..." +notify "OneDrive sync" "Sync started..." flock -n .onedrivesynclock rclone sync -c -L --log-file=logfile --log-level INFO source OneDrive:Syncs -notify-send2 "OneDrive sync" "Sync finished!" +notify "OneDrive sync" "Sync finished!" +