2023-07-21 20:12:20 +10:00
|
|
|
{
|
2024-01-24 09:06:07 +10:00
|
|
|
# reboot every sunday between 00:00 and 03:00
|
2023-07-21 20:12:20 +10:00
|
|
|
launchd.daemons.reboot = {
|
2023-12-11 11:21:35 +10:00
|
|
|
script = ''
|
|
|
|
date
|
2024-01-24 09:06:07 +10:00
|
|
|
/sbin/shutdown -r "+$(( $RANDOM % ( 3 * 60 ) ))"
|
2023-12-11 11:21:35 +10:00
|
|
|
'';
|
|
|
|
serviceConfig = {
|
|
|
|
StartCalendarInterval = [
|
|
|
|
{
|
|
|
|
Hour = 0;
|
|
|
|
Minute = 0;
|
|
|
|
Weekday = 0;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
StandardErrorPath = "/var/log/reboot.log";
|
|
|
|
StandardOutPath = "/var/log/reboot.log";
|
|
|
|
};
|
2023-07-21 20:12:20 +10:00
|
|
|
};
|
|
|
|
}
|