test 14 pid
This commit is contained in:
parent
a666c7f915
commit
17a289ecef
21
wire_g
21
wire_g
@ -89,18 +89,13 @@ import_wg(){
|
|||||||
then
|
then
|
||||||
wg_stop
|
wg_stop
|
||||||
nmcli connection import type wireguard file $wgconf &> ${wg_wdir}.tmp.txt
|
nmcli connection import type wireguard file $wgconf &> ${wg_wdir}.tmp.txt
|
||||||
wg_notify
|
wg_notify
|
||||||
kill -n $pid
|
|
||||||
wire_g
|
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
nmcli connection import type wireguard file $wgconf &> ${wg_wdir}.tmp.txt
|
nmcli connection import type wireguard file $wgconf &> ${wg_wdir}.tmp.txt
|
||||||
wg_notify
|
wg_notify
|
||||||
kill -n $pid
|
|
||||||
wire_g
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
kill -n $pid
|
||||||
|
wire_g
|
||||||
fi ;;
|
fi ;;
|
||||||
|
|
||||||
*) yad --button=$"OK" --title=$"Wireguard .conf Select file" \
|
*) yad --button=$"OK" --title=$"Wireguard .conf Select file" \
|
||||||
@ -138,19 +133,21 @@ remove(){
|
|||||||
then
|
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
|
||||||
yad --window-icon=${wg_pic}wg-trash.png \
|
yad --window-icon=${wg_pic}wg-trash.png \
|
||||||
--image-on-top --image=${wg_pic}wg-info.png \
|
--image-on-top --image=${wg_pic}wg-info.png \
|
||||||
--text=$"Your tunnel $selection was successfully deleted." \
|
--text=$"Your tunnel $selection was successfully deleted." \
|
||||||
--text-align=center --button=$"OK" --title "Wire-G Trash" \
|
--text-align=center --button=$"OK" --title "Wire-G Trash" \
|
||||||
--center --buttons-layout=center --borders=8
|
--center --buttons-layout=center --borders=8
|
||||||
else
|
else
|
||||||
yad --window-icon=${wg_pic}wg-trash.png \
|
yad --window-icon=${wg_pic}wg-trash.png \
|
||||||
--image-on-top --image=${wg_pic}wg-info.png \
|
--image-on-top --image=${wg_pic}wg-info.png \
|
||||||
--text=$"Oh something went wrong.\nPlease delete tunnel in the network manager." \
|
--text=$"Oh something went wrong.\nPlease delete tunnel in the network manager." \
|
||||||
--text-align=center --button=$"OK" --title "Wire-G Trash" \
|
--text-align=center --button=$"OK" --title "Wire-G Trash" \
|
||||||
--center --buttons-layout=center --borders=8
|
--center --buttons-layout=center --borders=8
|
||||||
fi
|
fi
|
||||||
|
kill -n $pid
|
||||||
|
wire_g
|
||||||
if [ "$selection" = "$active" ]
|
if [ "$selection" = "$active" ]
|
||||||
then
|
then
|
||||||
pkill wire_g
|
pkill wire_g
|
||||||
|
Loading…
x
Reference in New Issue
Block a user