From 0563b4268414de718f27d466f90442324caeb39f Mon Sep 17 00:00:00 2001 From: John Mertz Date: Thu, 19 Oct 2023 12:39:51 -0600 Subject: [PATCH] Run wireguard as user --- rofi/rofi-openvpn.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rofi/rofi-openvpn.sh b/rofi/rofi-openvpn.sh index 95ea4b6..0b4f99c 100755 --- a/rofi/rofi-openvpn.sh +++ b/rofi/rofi-openvpn.sh @@ -8,16 +8,16 @@ if [ $res = "Connection" ]; then /usr/bin/uxterm -e 'sudo /usr/bin/nmtui' elif [ $res = "John.Me.tz" ]; then sudo /usr/bin/systemctl stop openvpn-client@mailcleaner - sudo /usr/bin/systemctl restart wg-quick@wg0 + /usr/bin/systemctl --user restart wg-quick@wg0 elif [ $res = "MailCleaner" ]; then - sudo /usr/bin/systemctl stop wg-quick@wg0 + /usr/bin/systemctl --user stop wg-quick@wg0 sudo /usr/bin/systemctl restart openvpn-client@mailcleaner elif [ $res = "Disconnect" ]; then sudo /usr/bin/systemctl stop openvpn-client@mailcleaner - sudo /usr/bin/systemctl stop wg-quick@wg0 + /usr/bin/systemctl --user stop wg-quick@wg0 elif [ $res = "Restart" ]; then if [ "`ip addr show wg0 2> /dev/null`" != "" ]; then - sudo /usr/bin/systemctl restart wg-quick@wg0 + /usr/bin/systemctl --user restart wg-quick@wg0 fi if [ "`ip addr show tun0 2> /dev/null`" != "" ]; then sudo /usr/bin/systemctl restart openvpn-client@mailcleaner