fehler korrigiert und stop skript übersetzt

This commit is contained in:
2023-11-01 09:05:51 +01:00
parent d81eec1ece
commit 536a8421af
2 changed files with 7 additions and 6 deletions

10
wire_g
View File

@ -43,7 +43,7 @@ wg_notify(){
#Icon des Menübuttons definieren
echo "icon:${wg_pic}wg-vpn.png" >&3
#Name des Menüs definieren
echo "tooltip:$active aktiv" >&3
echo "tooltip:$active activ" >&3
}
export -f wg_notify
@ -66,11 +66,11 @@ import_wg(){
then
active=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//')
if [ -n $active ]
then
then
wg_stop
nmcli connection import type wireguard file $wgconf > ${wg_wdir}.tmp.txt
wg_notify
else
wg_stop
nmcli connection import type wireguard file $wgconf > ${wg_wdir}.tmp.txt
wg_notify
fi
@ -181,13 +181,13 @@ selection=$(yad --no-click --list \
--column 'Selection' $tunnel)
if [ "$?" = "0" ]
then
active=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//')
if [ -n $active ]
then
wg_stop
nmcli connection up $selection &> ${wg_wdir}.tmp.txt
connect
else
wg_stop
nmcli connection up $selection &> ${wg_wdir}.tmp.txt
connect
fi