tunnel doppelprüfung2
This commit is contained in:
parent
0a196f54e4
commit
1bb8963979
22
wire_g
22
wire_g
@ -85,22 +85,22 @@ 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
|
||||
|
||||
*_*.conf) if grep -i 'PEER\|PublicKey' $wgconf > /dev/null && grep -i 'Interface\|PrivateKey' $wgconf > /dev/null
|
||||
then
|
||||
then
|
||||
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
|
||||
wire_g
|
||||
done
|
||||
active=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//')
|
||||
if [[ -n $active ]]
|
||||
then
|
||||
|
Loading…
x
Reference in New Issue
Block a user