super icon indicating copy to clipboard operation
super copied to clipboard

Unattended Mode and Maintenance Windows

Open jshirle2 opened this issue 2 years ago • 10 comments

I would love to see Super support an unattended mode and/or maintenance windows. Unattended mode would ensure Super only installs/reboots when no one is logged into the machine. Maintenance Windows only allow Super to install/restart during specific time frames. The original use case for this were computer labs and/or Libraries where the machines could be accessed at any point during the day but we don't want to disrupt the experience of the user at all if possible; there are large parts of the day where the machine is unattended however. Deferrals do not work in this instance as it will be a different user each time and would just add confusion.

Thanks!

jshirle2 avatar Sep 30 '22 20:09 jshirle2

Good ideas here. During the maintenance window would you want to force the update/restart if someone was logged into the system? I ask because if there was a habitually logged in computer it would never update/restart.

Macjutsu avatar Oct 03 '22 14:10 Macjutsu

In my mind that is what the unattended mode would be for. So, if you had a maintenance window set from 2 AM to 6 AM, and unattended mode is false (default I would assume) then Super would just start a countdown to reboot the system. I am not familiar enough with the options yet to know whether that could just utilize another option you already have created.

An admin could be extra safe and use unattended mode = true and maintenance windows 2 AM to 6 AM to only install updates during the time if no one was logged into the machine (that is probably what I would use for my initial use case).

jshirle2 avatar Oct 04 '22 15:10 jshirle2

This would help with our needs as well. We use an auto logout profile so if a lab machine is unattended it logs the user out after x minutes (standard jamf settings profile). It does not always work though as certain apps keep the session alive if the user leaves them running. A "killall loginwindow" usually gets the user off so we can continue maintenance or a forced reboot (for some reason the reboot doesn't always work). A force out option with Super would help nicely with unattended maintenance windows.

KUSU2 avatar Oct 04 '22 21:10 KUSU2

I'm interested in this too, my focus has been or staff computers but we do have labs here as well, where I'd like to limit it to weekends, however I was thinking about limiting all the defer features, and having a jamf policy to run it limited to the weekends.

wakco avatar Oct 05 '22 00:10 wakco

you could put an IDLE timeout variable for unattended install. say if no input from keyboard or mouse for ~45 minutes, start the startosinstall unattended and force restart.

tranziq avatar Oct 11 '22 17:10 tranziq

@tranziq Yeah that isn't a bad addition. A bit risky though, so definitely needs to be optional.

jshirle2 avatar Oct 11 '22 18:10 jshirle2

Here is what we are using for our idle timeout function.

fIdleTime() { local _idle=$(echo $((ioreg -c IOHIDSystem | sed -e '/HIDIdleTime/ !{ d' -e 't' -e '}' -e 's/.* = //g' -e 'q' / 1000000000))) echo ${_idle} | sed 's/ //g' }

if [ "${fIdleTime}" -ge 2700 ] && [ "${currentDeferalCount}" -ge "${9}" ]; then continue workflow else Defer

tranziq avatar Nov 07 '22 09:11 tranziq

Thanks for this! I look forward to implementing this in v4.0.

Macjutsu avatar Nov 07 '22 19:11 Macjutsu

This will be very useful to several of our hot desks/shared iMacs.

One thing we had feedback from our end users while doing in place macOS upgrades is that it is happening during working hours, when they are "very very busy", and instead of deferrals they would like to set a date/time to when it will happen. This would be another implementation but it could fall under this "maintenance window" and force/set the update/upgrade there and then.

mauriciope avatar Nov 09 '22 08:11 mauriciope

This is partially implemented via the new scheduled installation options in https://github.com/Macjutsu/super/releases/tag/v5.0.0-beta2

It would be entirely too complicated to have multiple simultaneous workflows... instead you can override your default workflow with a temporary workflow until complete.

Macjutsu avatar Jul 26 '24 21:07 Macjutsu