Have reboot script check permissions.
Parameterize time in unattended-upgrade reboot call.