test 5 mit remove
This commit is contained in:
parent
0802fbc2fa
commit
0f339b48f5
25
wire_g
25
wire_g
@ -221,7 +221,7 @@ connect(){
|
||||
############################################################################################################ # --text "<b>Aktiver Tunnel:</b> <span color='#0fad0a'><b>$active</b></span> # mit <b>gewünschtes wort</b> wird fett geschrieben.
|
||||
# Farbe für Variable $active festgelegt mit fetter Schrift. (bei --text zwischen " ")
|
||||
|
||||
if selection=$(yad --no-klick --list --center \
|
||||
selection=$(yad --no-klick --list --center \
|
||||
--height=300 --width=60 --title="Wire-G" \
|
||||
--buttons-layout=center \
|
||||
--button=$"Start:0" --button=$"Stop":"bash -c up_or_down" \
|
||||
@ -235,18 +235,6 @@ if selection=$(yad --no-klick --list --center \
|
||||
<b>----------------------------------------------------------------------------------</b>
|
||||
<b>If no tunnels are listed,</b>
|
||||
<b>so they have to import their tunnel beforehand.</b>")
|
||||
|
||||
then
|
||||
if [[ -n $active ]]
|
||||
then
|
||||
wg_stop
|
||||
nmcli connection up $selection &> ${wg_wdir}.tmp.txt
|
||||
connect
|
||||
else
|
||||
nmcli connection up $selection &> ${wg_wdir}.tmp.txt
|
||||
connect
|
||||
fi
|
||||
|
||||
ret=$?
|
||||
|
||||
[[ $? -eq 1 ]] && exit 0
|
||||
@ -256,6 +244,17 @@ if [[ $ret -eq 4 ]]
|
||||
remove
|
||||
fi
|
||||
|
||||
if [[ $ret -eq 0 ]]
|
||||
then
|
||||
if [[ -n $active ]]
|
||||
then
|
||||
wg_stop
|
||||
nmcli connection up $selection &> ${wg_wdir}.tmp.txt
|
||||
connect
|
||||
else
|
||||
nmcli connection up $selection &> ${wg_wdir}.tmp.txt
|
||||
connect
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user