autopeering/nodes/wg-services.sh
lare bee8ecd06f [hotfix][nodes] only use ASn in interface name
- it is only 15 chars by default (change requires kernel recompile)
- thanks to @famfo for have a long mntner name
2023-01-21 11:32:17 +01:00

25 lines
No EOL
487 B
Bash
Executable file

#!/bin/bash
ACTION=$1
case $ACTION in
enable)
systemctl enable "wg-quick@dn42_$2";
;;
disable)
systemctl disable "wg-quick@dn42_$2"
;;
start)
systemctl start "wg-quick@dn42_$2"
;;
stop)
systemctl stop "wg-quick@dn42_$2"
;;
*)
echo “User Selected Choice not present”
exit 1
esac