neues remove Fenster
This commit is contained in:
parent
1d5d98930a
commit
2eb6b6adfc
1
.tmp.txt
Normal file
1
.tmp.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fehler: weder eine gültige Verbindung noch ein Gerät angegeben.
|
19
wire_g
19
wire_g
@ -130,6 +130,15 @@ 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 --center \
|
||||||
|
--window-icon=${wg_pic}wg-trash.png \
|
||||||
|
--height=200 --width=60 --undecorated \
|
||||||
|
--buttons-layout=center --separator="" \
|
||||||
|
--button=$"OK" --button=$"Cancel" \
|
||||||
|
--borders=8 \
|
||||||
|
--column=$"Delete" $tunnel)
|
||||||
|
|
||||||
|
then
|
||||||
nmcli connection delete $selection &> ${wg_wdir}.tmp.txt
|
nmcli connection delete $selection &> ${wg_wdir}.tmp.txt
|
||||||
if success=$(grep -i 'erfolgreich gelöscht\|successfully deleted' ${wg_wdir}.tmp.txt)
|
if success=$(grep -i 'erfolgreich gelöscht\|successfully deleted' ${wg_wdir}.tmp.txt)
|
||||||
then
|
then
|
||||||
@ -149,9 +158,10 @@ remove(){
|
|||||||
then
|
then
|
||||||
pkill wire_g
|
pkill wire_g
|
||||||
pkill yad
|
pkill yad
|
||||||
fi }
|
fi
|
||||||
|
fi }
|
||||||
export -f remove
|
export -f remove
|
||||||
|
|
||||||
# function end
|
# function end
|
||||||
############################################################################################################
|
############################################################################################################
|
||||||
############################################################################################################
|
############################################################################################################
|
||||||
@ -218,9 +228,9 @@ connect(){
|
|||||||
if selection=$(yad --no-klick --list --center \
|
if selection=$(yad --no-klick --list --center \
|
||||||
--height=300 --width=60 --title="Wire-G" \
|
--height=300 --width=60 --title="Wire-G" \
|
||||||
--buttons-layout=center \
|
--buttons-layout=center \
|
||||||
--button=$"OK" --button=$"Stop":"bash -c up_or_down" \
|
--button=$"Start:0" --button=$"Stop":"bash -c up_or_down" \
|
||||||
--button=$"Import":"bash -c import_wg" \
|
--button=$"Import":"bash -c import_wg" \
|
||||||
--form --field=$"Remove:0""bash -c remove" --separator="" \
|
--button=$"Remove":"bash -c remove" --separator="" \
|
||||||
--button=$"About":"bash -c about" \
|
--button=$"About":"bash -c about" \
|
||||||
--window-icon=${wg_pic}wg-vpn.png \
|
--window-icon=${wg_pic}wg-vpn.png \
|
||||||
--borders=8 --image-on-top --image=${wg_pic}wg-active.png \
|
--borders=8 --image-on-top --image=${wg_pic}wg-active.png \
|
||||||
@ -229,7 +239,6 @@ if selection=$(yad --no-klick --list --center \
|
|||||||
<b>----------------------------------------------------------------------------------</b>
|
<b>----------------------------------------------------------------------------------</b>
|
||||||
<b>If no tunnels are listed,</b>
|
<b>If no tunnels are listed,</b>
|
||||||
<b>so they have to import their tunnel beforehand.</b>")
|
<b>so they have to import their tunnel beforehand.</b>")
|
||||||
export selection
|
|
||||||
then
|
then
|
||||||
if [[ -n $active ]]
|
if [[ -n $active ]]
|
||||||
then
|
then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user