Run wireguard as user

This commit is contained in:
John Mertz 2023-10-19 12:39:51 -06:00
parent 8552974810
commit 0563b42684
1 changed files with 4 additions and 4 deletions

View File

@ -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