From fbebe470f7c7fd701af8fbc00f048db43707bbe1 Mon Sep 17 00:00:00 2001 From: Brian Gregory Date: Sun, 14 Mar 2021 21:10:13 +0000 Subject: [PATCH 1/2] Update get_wireguard.sh --- get_wireguard.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/get_wireguard.sh b/get_wireguard.sh index 51c5276..966c404 100644 --- a/get_wireguard.sh +++ b/get_wireguard.sh @@ -87,6 +87,7 @@ function vyatta_cfg_teardown() { if [ "$(id -g -n)" != 'vyattacfg' ] ; then # Replace current shell with this script running as group 'vyattacfg' with # identical bash options and parameters + echo switching group to vyattacfg... exec sg vyattacfg -c "$(which bash) -$- $(readlink -f $0) $*" fi From 3c92bdd0008f7f1dee18d9fba08c0690e1ac2a64 Mon Sep 17 00:00:00 2001 From: Brian Gregory Date: Sun, 14 Mar 2021 21:10:55 +0000 Subject: [PATCH 2/2] Update uninstall_wireguard.sh --- uninstall_wireguard.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uninstall_wireguard.sh b/uninstall_wireguard.sh index 2b5d7a6..c5c2652 100644 --- a/uninstall_wireguard.sh +++ b/uninstall_wireguard.sh @@ -58,8 +58,10 @@ function add_to_path() { } if [ "$(id -g -n)" != 'vyattacfg' ] ; then - die "Unable to continue running script without 'vyattacfg' group permission." + echo switching group to vyattacfg... + exec sg vyattacfg -c "$(which bash) -$- $(readlink -f $0) $*" fi + [[ $EUID -ne 0 ]] && SUDO='sudo' add_to_path /sbin /usr/sbin