arch-linux-update-and-restart/arch-linux-update-and-restart.service
hygienic-books bae0dc09fa fix(script): Run as unprivileged user 'build'
If we run as 'root' updates for AUR packages fail
2025-01-31 01:05:00 +01:00

15 lines
345 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 '/usr/local/bin/arch-needs-restart | grep -Piq '"'"'# [^:]+: reboot required'"'"' && reboot || true'
[Install]
WantedBy=multi-user.target