Skip to main content
Question

Restart Option not restarting the computer


Forum|alt.badge.img+20

I have a policy that installs an application via Self Service and the restart option for both 'no user logged in' & 'user logged in' is to RESTART IMMEDIATELY

but after the application installs a pop-up appears saying 'computer is scheduled to restart' - I click OK and it doesn't restart.

i though it should 'restart immediately' since that is the setting i have it for???

anyone else have this issue?

JAMF PRO 10.7.1

8 replies

mm2270
Forum|alt.badge.img+16
  • Legendary Contributor
  • 7880 replies
  • November 13, 2018

Yeah, this an old old issue that was supposedly addressed, but it's about as clear as mud if it was ever really fixed. You might want to peruse this super old Feature Request thread, where quite a few regulars here went back and forth with Jamf on this one. It's entirely possible this is still not implemented as promised.
The main problem seems to stem from being run from a Self Service run policy. I'm willing to bet if you just made it a silent policy it would in fact reboot, but of course the user experience there would be quite jarring since the user would have no clue why their Mac just spontaneously rebooted on them.


Forum|alt.badge.img+20
  • Author
  • Contributor
  • 979 replies
  • November 13, 2018

yep, i don't want to do that to the user.

i'm gonna remove the 'restart options' payload

add the 'configure files and processes' and add the shutdown -r now

and see if this works

I have a second self service policy that restarts -- not sure why this one doesn't


Forum|alt.badge.img+20
  • Author
  • Contributor
  • 979 replies
  • November 13, 2018

looks like removing the 'restart options' payload and configuring the 'configure files and processes' and add the shutdown -r now to the 'execute command' has done the trick

BUT it didn't log the policy as running -- the computer shows it at 'pending'

changing it from shutdown -r now. to. shutdown -r +2


mm2270
Forum|alt.badge.img+16
  • Legendary Contributor
  • 7880 replies
  • November 13, 2018

Yeah, I was going to mention that doing shutdown -r now would leave the policy as pending in the policy logs, so I'm glad you caught that. It doesn't allow for the log to be uploaded to the server. Even doing +1 might be enough time, but +2 is probably a pretty safe value to use.


Forum|alt.badge.img+20
  • Author
  • Contributor
  • 979 replies
  • November 13, 2018

yep, i just changed it to shutdown -r +2

using shutdown -h +2 completely shutdown the computer, so gotta use -r +2


Forum|alt.badge.img+16
  • Valued Contributor
  • 1002 replies
  • November 13, 2018

Does shutdown automatically go to the background? If not use.
shutdown -r +2 &
This will allow the command to complete in the background and the policy to continue.
Also if you have Inventory Update selected in the policy you may need more than +2 to give time for this to complete.


Forum|alt.badge.img+20
  • Author
  • Contributor
  • 979 replies
  • November 13, 2018

i switched it to shutdown -r +4

I did not add the & after +4, should I ?

the policy consists of these 4 -- General
-- Packages
-- Maintenance (inventory update)
-- Files and Processes (shutdown -r +4)

the 'files and processes' is the last payload, so doesn't that run last ???


Forum|alt.badge.img+16
  • Valued Contributor
  • 1002 replies
  • November 13, 2018

Inventory always runs last even when multiple policies are run.

The & is only really necessary if there is an error, some commands hold the process until they are complete, the & allows it to proceed to the next command and leave the previous one processing in the background (i.e. in this case waiting 4 minutes) I think maybe shutdown -r does this automatically though.


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