arch-linux-update-and-restart/arch-linux-update-and-restart.service
hygienic-books 4cd16bb4b1 fix(script): sudo
Without sudo an unprivileged user cannot always see all lsof library
changes.
2025-02-25 05:43:41 +01:00

15 lines
355 B
Desktop File

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