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