[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