Add converge-wake.service and systemd-sleep hook for wake-from-sleep sync
Build / build (push) Failing after 12m9s
Build / build (push) Failing after 12m9s
Creates a oneshot user service (converge-wake.service) that runs converge --sync after the network is online, and a systemd-sleep hook (/usr/lib/systemd/system-sleep/converge-wake) that triggers the service for each logged-in user on resume. Uses After=network-online.target for proper network timing on NetworkManager/systemd-networkd setups, with a 5-second ExecStartPre delay as a safety net for netctl and other environments where network-online.target may not gate on resume. Updated PKGBUILD and AGENTS.md accordingly.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
[Unit]
|
||||
Description=Converge - sync repos after waking from sleep
|
||||
Documentation=https://github.com/jbrechtel/converge
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/converge --sync
|
||||
# Small delay as a safety net for environments (e.g. netctl) where
|
||||
# network-online.target may not gate properly on resume, giving the
|
||||
# network stack time to reconnect before converge attempts to pull.
|
||||
ExecStartPre=/bin/sleep 5
|
||||
|
||||
# Allow notify-send to reach the desktop session
|
||||
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%U/bus
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Reference in New Issue
Block a user