Run wireguard as user
This commit is contained in:
parent
8552974810
commit
0563b42684
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue