modules/darwin/common/reboot: add logs

This commit is contained in:
zowoq 2023-12-11 11:21:35 +10:00
parent 73e1cf8bf9
commit 134882a2b4

View file

@ -1,13 +1,20 @@
{
# reboot every sunday between 00:00 and 06:00
launchd.daemons.reboot = {
script = ''/sbin/shutdown -r "+$(( $RANDOM % ( 6 * 60 ) ))"'';
serviceConfig.StartCalendarInterval = [
{
Hour = 0;
Minute = 0;
Weekday = 0;
}
];
script = ''
date
/sbin/shutdown -r "+$(( $RANDOM % ( 6 * 60 ) ))"
'';
serviceConfig = {
StartCalendarInterval = [
{
Hour = 0;
Minute = 0;
Weekday = 0;
}
];
StandardErrorPath = "/var/log/reboot.log";
StandardOutPath = "/var/log/reboot.log";
};
};
}