power: keep wayback awake lid-closed (never-sleep)
wayback runs as an always-on router living lid-closed in the van, but stock logind HandleLidSwitch=suspend would sleep it on lid close (even on AC). Add a logind drop-in that ignores the lid in all states and mask every sleep target so idle/GUI/stray `systemctl suspend` can't suspend it either. - power/10-vanlink-nolid.conf -> /etc/systemd/logind.conf.d/ - deploy.sh: install drop-in, mask sleep/suspend/hibernate/hybrid-sleep, restart systemd-logind - README: power/ layout row, never-sleep operation notes + reversal recipe Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
387375de1e
commit
35466f0141
@@ -33,6 +33,11 @@ echo "== cockpit plugin =="
|
||||
install -d /usr/share/cockpit/vanrouter
|
||||
install -m0644 cockpit/vanrouter/* /usr/share/cockpit/vanrouter/
|
||||
|
||||
echo "== power / never-sleep =="
|
||||
install -D -m0644 power/10-vanlink-nolid.conf /etc/systemd/logind.conf.d/10-vanlink-nolid.conf
|
||||
# Belt-and-suspenders: a router must never suspend from idle, GUI, or a stray `systemctl suspend`.
|
||||
systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target >/dev/null 2>&1 || true
|
||||
|
||||
echo "== apply =="
|
||||
sysctl --system >/dev/null
|
||||
systemctl daemon-reload
|
||||
@@ -40,6 +45,8 @@ systemctl daemon-reload
|
||||
# can never satisfy "online" and just burns its 120s timeout, stalling network-online.target
|
||||
# and ZeroTier by ~2min every boot. Real uplink readiness is covered by NetworkManager-wait-online.
|
||||
systemctl mask systemd-networkd-wait-online.service >/dev/null 2>&1 || true
|
||||
# pick up the lid drop-in (re-execs logind; does NOT drop the network)
|
||||
systemctl restart systemd-logind >/dev/null 2>&1 || true
|
||||
systemctl unmask hostapd >/dev/null 2>&1 || true
|
||||
systemctl enable regdomain.service hostapd van-ap-dnsmasq nftables systemd-networkd van-failover >/dev/null 2>&1 || true
|
||||
# restart in dependency order; AP iface IP first, then hostapd/dnsmasq, then NAT/failover
|
||||
|
||||
Reference in New Issue
Block a user