Hi,
I have created a force shutdown script with the help of numerous website and forum:
#!/bin/sh
# First, a little warning:
/usr/bin/osascript << EOT
display dialog "This is a message from the IT Department
Your computer will restart in 15 seconds" giving up after 7 with icon stop buttons {"OK"} default button "OK"
set input to 15
set countdown to input
repeat input times
display dialog "Time remaining!! " & countdown giving up after 1 buttons {"OK"} default button "OK"
set countdown to countdown - 1
end repeat
beep
EOT
# Now we shutdown the computer:
sudo shutdown && exit 0
I push this script via Apple Remote Desktop and if the computer is connected via Ethernet, the Task on ARD completes successfully. But if the computer is connected to the network over the Wi-Fi, then the task remains on "running" and even after a reboot of the client, the task will never return completed or failed... I have to stop the task in order to push the script to an other machine.
What do I need to do on my script so that it returns something to the deployment software, whether it is connected by Ethernet or Wi-Fi?
Thank you in advance for anyone spending some time on my issue.