Bug fixing

This commit is contained in:
Sayantan Santra 2022-01-08 18:24:52 -06:00
parent 6a2a8a8e62
commit 9564ced456

View file

@ -7,7 +7,7 @@ if [ $(id -u) -eq 0 ]; then
exec sudo -H -u <user> $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!"