Skip to main content
Question

Create server log entry inside script

  • July 8, 2021
  • 1 reply
  • 0 views

Forum|alt.badge.img+2

I have a bash script which restarts, after Killing Zoom Rooms via killall.

shutdown -R now

I use this script because for whatever reason a policy using Restart Options does not work, likely because Zoom Rooms blocks it.

Unfortunately there is never a record of this script being run, either in the policies log nor any log I can find within the computer history, likely because the computer reboots before Jamf can record the execution of this script.

Is there any way to write a log of this event just before the reboot happens?

Is there a command like line 3 of the following?:

! /bin/zsh

killall ZoomPresence
jamf writeLogEntry
shutdown -r now
exit 0

Thank you!

1 reply

bentoms
Forum|alt.badge.img+35
  • Legendary Contributor
  • 4331 replies
  • July 14, 2021

Maybe try:

/sbin/shutdown -r +1 instead of now

That would should down after a minute.. and the script will exit after the shutdown command is sent.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings