tunnel doppelprüfung2
This commit is contained in:
parent
0a196f54e4
commit
1bb8963979
12
wire_g
12
wire_g
@ -86,6 +86,11 @@ import_wg(){
|
||||
--window-icon=${wg_pic}wg-import.png \
|
||||
--title=$"Wireguard .conf Select file")
|
||||
|
||||
then
|
||||
case "$wgconf" in
|
||||
|
||||
*_*.conf) if grep -i 'PEER\|PublicKey' $wgconf > /dev/null && grep -i 'Interface\|PrivateKey' $wgconf > /dev/null
|
||||
then
|
||||
IFS=$'\n' lines=( $(cat ${wg_wdir}.tunnel.txt) )
|
||||
for wgconf in "${lines[@]}"
|
||||
do
|
||||
@ -94,13 +99,8 @@ import_wg(){
|
||||
--text "Tunnelname existiert schon." \
|
||||
--text-align=center --title=$"Wireguard .conf Select file"
|
||||
break
|
||||
wire_g
|
||||
done
|
||||
|
||||
then
|
||||
case "$wgconf" in
|
||||
|
||||
*_*.conf) if grep -i 'PEER\|PublicKey' $wgconf > /dev/null && grep -i 'Interface\|PrivateKey' $wgconf > /dev/null
|
||||
then
|
||||
active=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//')
|
||||
if [[ -n $active ]]
|
||||
then
|
||||
|
Loading…
x
Reference in New Issue
Block a user