Files
neoromantique-dotfiles/home/dot_local/bin/executable_vpn-helper
David Aizenberg f1f2ba2bbe sync
2026-03-17 20:08:29 +01:00

24 lines
406 B
Bash

#!/usr/bin/env bash
set -euo pipefail
# Helper script for vpn-switcher to run privileged commands
# This gets called via pkexec
ACTION="$1"
shift
case "$ACTION" in
wg-up)
wg-quick up "$1"
;;
wg-down)
wg-quick down "$1"
;;
systemctl-start)
systemctl start "$1"
;;
*)
echo "Unknown action: $ACTION" >&2
exit 1
;;
esac