1

I see that unattended-upgrades issues shutdown -r command with the scheduled time. However, the PC is sleeping at that time. It also doesn't restart after manual wakeup. This is for a computer novice user (grandma), she most certainly forgets to restart it every week or so. And i don't want to restart it immediately to avoid interrupting her work, so decided to do it in the middle of the night.

UPDATE: Grandma wakes the PC from sleep with some random button, most certainly the power button.

Lyubomir
  • 191

1 Answers1

1

"Reboot required" is indicated by the existence of the files /var/run/reboot*.

You could create a root cron job (note: root's crontab is a different format, read man 5 crontab), to run at 4AM and do something like:

#!/bin/bash
zz="$(find /var/run -type f -name 'reboot*')"
[[ -n "$zz" ]] && shutdown -r +10 
waltinator
  • 37,856