aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/waybar/executable_snx-vpn-toggle.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dot_config/waybar/executable_snx-vpn-toggle.sh')
-rw-r--r--dot_config/waybar/executable_snx-vpn-toggle.sh19
1 files changed, 0 insertions, 19 deletions
diff --git a/dot_config/waybar/executable_snx-vpn-toggle.sh b/dot_config/waybar/executable_snx-vpn-toggle.sh
deleted file mode 100644
index 80ced4c..0000000
--- a/dot_config/waybar/executable_snx-vpn-toggle.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env dash
-# Toggle the snx-rs (Check Point) tunnel.
-#
-# Refresh the waybar custom/snx-vpn module immediately with SIGRTMIN+9.
-set -eu
-
-state=$(timeout 2 snxctl status 2>/dev/null || echo Disconnected)
-
-case "$state" in
- *"Disconnected"*)
- setsid -f snxctl connect >/tmp/snxctl.log 2>&1 &
- ;;
- *)
- snxctl disconnect >/dev/null 2>&1 || true
- ;;
-esac
-
-pid=$(pidof waybar || true)
-if [ -n "$pid" ]; then kill -SIGRTMIN+9 "$pid" 2>/dev/null || true; fi