remove-neu
This commit is contained in:
parent
352ab6cfb0
commit
d980a099de
18
wire_g
18
wire_g
@ -106,12 +106,18 @@ remove(){
|
|||||||
nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//' &> ${wg_wdir}.wg_noactive.txt
|
nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//' &> ${wg_wdir}.wg_noactive.txt
|
||||||
active=$(cat ${wg_wdir}.wg_noactive.txt)
|
active=$(cat ${wg_wdir}.wg_noactive.txt)
|
||||||
|
|
||||||
if selection=$(yad --no-click --list --height=300 --width=60 \
|
if selection=$(yad --no-click --list --center \
|
||||||
--title="Wire-G Trash" --center \
|
--window-icon=${wg_pic}wg-trash.png \
|
||||||
--fixed --buttons-layout=center \
|
--height=300 --width=60 --title="Wire-G Trash" \
|
||||||
--button=$"OK" --button=$"Cancel" \
|
--fixed --buttons-layout=center --separator="" \
|
||||||
--separator="" --window-icon=${wg_pic}wg-trash.png \
|
--button=$"OK" --button=$"Cancel" \
|
||||||
--borders=8 --column=$"Delete" $tunnel)
|
--borders=8 --image-on-top --image=${wg_pic}wg-active.png \
|
||||||
|
--column=$"Delete" $tunnel \
|
||||||
|
--text=$"<b>Activ Tunnel: </b> <span color='#0fad0a'><b>$active</b></span>
|
||||||
|
<b>----------------------------------------------------------------------------------</b>
|
||||||
|
<b>If no tunnels are listed,</b>
|
||||||
|
<b>so they have to import their tunnel beforehand.</b>")
|
||||||
|
|
||||||
then
|
then
|
||||||
nmcli connection delete $selection &> ${wg_wdir}.tmp.txt
|
nmcli connection delete $selection &> ${wg_wdir}.tmp.txt
|
||||||
success=$(grep -i 'erfolgreich gelöscht\|successfully deleted' ${wg_wdir}.tmp.txt)
|
success=$(grep -i 'erfolgreich gelöscht\|successfully deleted' ${wg_wdir}.tmp.txt)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user