I need to develop a scripted solution that restarts the Mac on every logoff...

teodle
Contributor II

it's to attempt to remediate a rather strange situation involving AD bound Mac labs with 802.11 Login Window profile payload. 

These AD bound lab Macs lose all communications with JAMF due to loss of IP. It's an Aruba wifi network, btw. 

The behavior:

On boot the Mac gets a "machine IP" address and can check in with the JSS normally. 

A user then logs in and auths to both the wifi and the DC to use the Mac. Machine continues to check in with the JSS. 

But then after user A logs out, the IP address drops. No more communications with the JSS until either

1. User B logs in 

2. The Machine is rebooted. 

A manager asked us to try a logout hook policy that simply reboots the Mac on logout. Manager wasn't aware that JAMF policy logout trigger has been deprecated due to logouthooks being deprecated by Apple

 

Anyone use Offset?

https://github.com/aysiu/offset

It appears that the dev. hasn't been updating it; the github page doesn't mention support beyond Mojave. 

 

 

1 REPLY 1

sgiesbrecht
Contributor III

I have mine set up to restart if uptime is over 7 days

Just create a policy to restart

General > Network State Change option = Enabled

Restart Options > No User Logged In Action = Restart immediately

Restart Options > User Logged In Action = Restart immediately