mirror of
https://github.com/neoromantique/dotfiles.git
synced 2026-03-13 21:53:20 +03:00
23 lines
380 B
Bash
23 lines
380 B
Bash
#!/bin/bash
|
|
# 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
|