From caa5ee52074428689cb4537a0db71b15db39a19a Mon Sep 17 00:00:00 2001 From: Bryan Roessler Date: Fri, 22 Oct 2021 17:09:28 -0400 Subject: [PATCH] Fix installer --- script-system-scheduled-restart | 2 +- smartd-notify-all | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/script-system-scheduled-restart b/script-system-scheduled-restart index f54122d7..4955e3b6 100755 --- a/script-system-scheduled-restart +++ b/script-system-scheduled-restart @@ -39,7 +39,7 @@ for LINE in $(w -hs); do USER=$(echo "$LINE" | awk '{print $1}') USER_ID=$(id -u "$USER") DISP_ID=$(echo "$LINE" | awk '{print $8}') - su "$USER" DISPLAY="$DISP_ID" DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/"$USER_ID"/bus notify-send "$message" --icon=dialog-warning + sudo -u "$USER" DISPLAY="$DISP_ID" DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/"$USER_ID"/bus notify-send "$message" --icon=dialog-warning done # Wall notification diff --git a/smartd-notify-all b/smartd-notify-all index f8da737d..dc990733 100755 --- a/smartd-notify-all +++ b/smartd-notify-all @@ -12,5 +12,5 @@ for LINE in $(w -hs); do USER=$(echo "$LINE" | awk '{print $1}') USER_ID=$(id -u "$USER") DISP_ID=$(echo "$LINE" | awk '{print $8}') - su "$USER" DISPLAY="$DISP_ID" DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/"$USER_ID"/bus notify-send "S.M.A.R.T Error ($SMARTD_FAILTYPE) $SMARTD_MESSAGE" --icon=dialog-warning + sudo su "$USER" DISPLAY="$DISP_ID" DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/"$USER_ID"/bus notify-send "S.M.A.R.T Error ($SMARTD_FAILTYPE) $SMARTD_MESSAGE" --icon=dialog-warning done \ No newline at end of file