Posted on 11-13-2018 11:27 AM
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
Posted on 11-13-2018 11:43 AM
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.
Posted on 11-13-2018 11:53 AM
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
Posted on 11-13-2018 12:16 PM
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
Posted on 11-13-2018 12:27 PM
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.
Posted on 11-13-2018 12:34 PM
yep, i just changed it to shutdown -r +2
using shutdown -h +2 completely shutdown the computer, so gotta use -r +2
Posted on 11-13-2018 01:09 PM
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.
Posted on 11-13-2018 02:44 PM
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 ???
Posted on 11-13-2018 02:57 PM
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.