mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-26 21:18:36 -06:00
Bug fixing
This commit is contained in:
parent
6a2a8a8e62
commit
9564ced456
1 changed files with 4 additions and 3 deletions
|
@ -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!"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue