aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/etc/systemd/system-sleep/50-snx-rs
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-06-15 00:55:43 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-06-15 00:55:43 +0100
commitbb607b3cdb027a2d02cf2111b8ee12dab172efad (patch)
treea52c1d792ed17640bbbe1e8581eded4f1e9004b7 /etc/systemd/system-sleep/50-snx-rs
parent14f5a45a67b2d719e8912c335be8f521e39291fd (diff)
downloaddotfiles-bb607b3cdb027a2d02cf2111b8ee12dab172efad.tar.gz
dotfiles-bb607b3cdb027a2d02cf2111b8ee12dab172efad.tar.bz2
dotfiles-bb607b3cdb027a2d02cf2111b8ee12dab172efad.zip
Reduce AUR package surface
Move pass-secret-service, snx-rs, and Sparrow under Nix/Home Manager. Track the snx-rs system unit, pass-secret-service user unit, and pacman cache cleanup hook in the repo. Drop the mkinitcpio firmware metapackage, overdue, pacman-cleanup-hook, and the standalone btc package group.
Diffstat (limited to 'etc/systemd/system-sleep/50-snx-rs')
-rwxr-xr-xetc/systemd/system-sleep/50-snx-rs25
1 files changed, 6 insertions, 19 deletions
diff --git a/etc/systemd/system-sleep/50-snx-rs b/etc/systemd/system-sleep/50-snx-rs
index 5241126..3738f72 100755
--- a/etc/systemd/system-sleep/50-snx-rs
+++ b/etc/systemd/system-sleep/50-snx-rs
@@ -1,5 +1,5 @@
#!/bin/sh
-# Bounce the user-scope snx-rs (Check Point) tunnel around suspend/hibernate.
+# Bounce the system-scope snx-rs (Check Point) tunnel around suspend/hibernate.
#
# Problem: during suspend the IKE SA keepalive is interrupted and the SAML
# session cookie may expire. snx-rs doesn't detect this — the daemon
@@ -25,21 +25,8 @@ case "$1" in
*) exit 0 ;;
esac
-# Iterate over every logged-in user that has the snx-rs.service enabled.
-# loginctl list-users gives us "UID USER" pairs.
-loginctl list-users --no-legend 2>/dev/null |
- awk '{print $1, $2}' |
- while read -r uid user; do
- [ -n "$uid" ] && [ -n "$user" ] || continue
- runtime="/run/user/$uid"
- [ -d "$runtime" ] || continue
- # Skip users without snx-rs enabled to avoid spurious "Unit not found".
- runuser -u "$user" -- env \
- "XDG_RUNTIME_DIR=$runtime" \
- "DBUS_SESSION_BUS_ADDRESS=unix:path=$runtime/bus" \
- systemctl --user is-enabled snx-rs.service >/dev/null 2>&1 || continue
- runuser -u "$user" -- env \
- "XDG_RUNTIME_DIR=$runtime" \
- "DBUS_SESSION_BUS_ADDRESS=unix:path=$runtime/bus" \
- systemctl --user "$action" snx-rs.service || true
- done
+# The command-mode daemon runs as a system service because it configures
+# routes, DNS, and tunnel interfaces. Ignore missing/disabled states so this
+# hook remains harmless on non-work profiles.
+systemctl is-enabled snx-rs.service >/dev/null 2>&1 || exit 0
+systemctl "$action" snx-rs.service || true