Fix new shutdown script not working

This commit is contained in:
Andrew Hyatt 2019-11-25 23:54:37 -05:00
parent e84dbe7534
commit fd6bc3536f
No known key found for this signature in database
GPG Key ID: 5456D0F696719C24

View File

@ -5,7 +5,7 @@ PID=`pgrep launchd`
while [[ ! -z $PID ]]
do
THISPID=$(echo $PID | head -n1)
RUNNING_USER=$(ps -o uname= -p $THISPID)
RUNNING_USER=$(ps -o uname= -p $THISPID | head -n1)
echo "Darling currently running for $RUNNING_USER, shutting it down..."
sudo -u $RUNNING_USER darling shutdown
sleep 2