Initial commit
This commit is contained in:
parent
a05007220c
commit
456ca820e7
@ -1,3 +1,5 @@
|
|||||||
# arch-linux-update-and-restart
|
# 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.
|
||||||
|
13
arch-linux-update-and-restart.service
Normal file
13
arch-linux-update-and-restart.service
Normal 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
|
9
arch-linux-update-and-restart.timer
Normal file
9
arch-linux-update-and-restart.timer
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Update and restart OS
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=*-*-* 03:00:00
|
||||||
|
RandomizedDelaySec=1h
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
x
Reference in New Issue
Block a user