active variable bei up_or_down hinzugefügt
This commit is contained in:
parent
e0c10f2b38
commit
a1048076b5
15
wire_g
15
wire_g
@ -127,18 +127,17 @@ export -f remove
|
|||||||
############################################################################################################
|
############################################################################################################
|
||||||
#funktion for active tunnel a stop
|
#funktion for active tunnel a stop
|
||||||
up_or_down(){
|
up_or_down(){
|
||||||
|
active=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//')
|
||||||
if [ -z $active ]
|
if [ -z $active ]
|
||||||
then
|
then
|
||||||
yad --image-on-top --image=${wg_pic}wg-info.png \
|
yad --image-on-top --image=${wg_pic}wg-info.png \
|
||||||
--text="There is no active tunnel that you could stop.\n" \
|
--text="There is no active tunnel that you could stop.\n" \
|
||||||
--text-align=center --button="OK" --title "Wire-G" \
|
--text-align=center --button="OK" --title "Wire-G" \
|
||||||
--fixed --center --buttons-layout=center --borders=8 --center
|
--fixed --center --buttons-layout=center --borders=8 --center
|
||||||
else
|
else
|
||||||
wg_stop
|
wg_stop
|
||||||
|
|
||||||
fi
|
fi }
|
||||||
}
|
|
||||||
export -f up_or_down
|
export -f up_or_down
|
||||||
|
|
||||||
# funktion end
|
# funktion end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user