mirror of
https://github.com/neoromantique/dotfiles.git
synced 2026-04-10 04:58:07 +03:00
24 lines
406 B
Bash
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
|