Initial commit

This commit is contained in:
hygienic-books 2024-12-29 18:53:10 +01:00
parent a05007220c
commit 456ca820e7
3 changed files with 25 additions and 1 deletions

View File

@ -1,3 +1,5 @@
# arch-linux-update-and-restart
A systemd unit to auto-update Arch Linux and do a restart when updated libs or kernel remain in use.
A systemd unit to auto-update Arch Linux and do a restart when updated libs or kernel remain in use.
Requires https://quico.space/quico-os-setup/arch-needs-restart.

View File

@ -0,0 +1,13 @@
[Unit]
Description=Update and restart OS
Requires=network.target
After=network.target
[Service]
Type=oneshot
IgnoreSIGPIPE=no
ExecStart=/usr/bin/paru -Syu --noconfirm
ExecStartPost=/bin/bash -c '/usr/local/bin/arch-needs-restart | grep -Piq '"'"'# [^:]+: reboot required'"'"' && reboot || true'
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,9 @@
[Unit]
Description=Update and restart OS
[Timer]
OnCalendar=*-*-* 03:00:00
RandomizedDelaySec=1h
[Install]
WantedBy=multi-user.target