1
0
Fork 0
mirror of https://github.com/SinTan1729/random.git synced 2024-12-26 21:18:36 -06:00

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 "$@" exec sudo -H -u <user> $0 "$@"
fi fi
function notify-send2() { notify() {
#Detect the name of the display in use #Detect the name of the display in use
local display=":$(ls /tmp/.X11-unix/* | sed 's#/tmp/.X11-unix/X##' | head -n 1)" 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 "$@" 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 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!"