prüfung ob Tunnel schon importiert
This commit is contained in:
parent
d09563d737
commit
0a196f54e4
13
wire_g
13
wire_g
@ -85,6 +85,17 @@ import_wg(){
|
||||
--width=1200 --height=800 \
|
||||
--window-icon=${wg_pic}wg-import.png \
|
||||
--title=$"Wireguard .conf Select file")
|
||||
|
||||
IFS=$'\n' lines=( $(cat ${wg_wdir}.tunnel.txt) )
|
||||
for wgconf in "${lines[@]}"
|
||||
do
|
||||
yad --window-icon=${wg_pic}wg-stop.png \
|
||||
--image=${wg_pic}wg-info.png --button "OK" \
|
||||
--text "Tunnelname existiert schon." \
|
||||
--text-align=center --title=$"Wireguard .conf Select file"
|
||||
break
|
||||
done
|
||||
|
||||
then
|
||||
case "$wgconf" in
|
||||
|
||||
@ -97,7 +108,7 @@ import_wg(){
|
||||
nmcli connection import type wireguard file $wgconf &> ${wg_wdir}.tmp.txt
|
||||
wg_notify
|
||||
|
||||
i else
|
||||
else
|
||||
nmcli connection import type wireguard file $wgconf &> ${wg_wdir}.tmp.txt
|
||||
wg_notify
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user