Kaseya Community

Reboot the mac

  • Hello all,

    I want to reboot/shutdown Macs using Kaseya scripts.
    The normal reboot script within Kaseya doesn’t work.
    Then I tried the following:
    sudo shutdown -r now
    This works but the scripts doesn’t show as finished so every time the Mac is rebooted the scripts runs again and the machine reboots again. Eek

    Anyone got a solution to this problem?

    Legacy Forum Name: Reboot the mac,
    Legacy Posted By Username: lanlogic
  • perhaps a counter variable that you set somewhere - it would make it a multiple script problem I think tho ... not really sure the logic of it at first glance, but it poses an interesting problem - I use a MAC so might work on this some, will let you know if I find anything.

    Legacy Forum Name: Macintosh,
    Legacy Posted By Username: TBK Consulting
  • lanlogic
    Hello all,

    I want to reboot/shutdown Macs using Kaseya scripts.
    The normal reboot script within Kaseya doesn’t work.
    Then I tried the following:
    sudo shutdown -r now
    This works but the scripts doesn’t show as finished so every time the Mac is rebooted the scripts runs again and the machine reboots again. Eek

    Anyone got a solution to this problem?


    Just a thought. If this is a timing issue, it may make more sense to change "now" to a future time, say 30 seconds... Enough for the kaseya agent to call home.

    Legacy Forum Name: Macintosh,
    Legacy Posted By Username: Zestysoft
  • Looks like the delay did the trick.
    Like Zestysoft said the agent didnt have time to respond because the mac shutsdown pretty fast.

    im using:
    sudo shutdown -r +1

    And this does the trick.

    Thank you to you both for the help

    Legacy Forum Name: Macintosh,
    Legacy Posted By Username: lanlogic
  • Using "Reboot" from the drop down menu in the script works fine as well.

    Legacy Forum Name: Macintosh,
    Legacy Posted By Username: r520m