Created
May 3, 2020 20:28
-
-
Save grantjenks/10da869c3e005fa16525c0b54bd5c96b to your computer and use it in GitHub Desktop.
Weekly reboots using systemd.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/reboot.service | |
[Unit] | |
Description=Reboot Service | |
[Service] | |
Type=oneshot | |
ExecStart=/bin/systemctl --force reboot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/reboot.timer | |
[Unit] | |
Description=Reboot Timer | |
[Timer] | |
OnCalendar=Sun *-*-* 09:30:00 | |
[Install] | |
WantedBy=multi-user.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
systemctl daemon-reload | |
systemctl enable reboot.timer | |
systemctl start reboot.timer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment