This commit is contained in:
Désiré Werner Menrath 2023-11-09 18:39:47 +01:00
parent f31ce559bf
commit 2c3354f28d

3
wire_g
View File

@ -91,12 +91,13 @@ import_wg(){
*_*.conf) if grep -i 'PEER\|PublicKey' $wgconf > /dev/null && grep -i 'Interface\|PrivateKey' $wgconf > /dev/null *_*.conf) if grep -i 'PEER\|PublicKey' $wgconf > /dev/null && grep -i 'Interface\|PrivateKey' $wgconf > /dev/null
then then
while $wgconf in $(cat ${wg_wdir}.tunnel.txt) for wgconf in $(cat ${wg_wdir}.tunnel.txt)
do do
yad --window-icon=${wg_pic}wg-stop.png \ yad --window-icon=${wg_pic}wg-stop.png \
--image=${wg_pic}wg-info.png --button "OK" \ --image=${wg_pic}wg-info.png --button "OK" \
--text "Tunnelname existiert schon." \ --text "Tunnelname existiert schon." \
--text-align=center --title=$"Wireguard .conf Select file" --text-align=center --title=$"Wireguard .conf Select file"
exit 0
done done
active=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//') active=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//')
if [[ -n $active ]] if [[ -n $active ]]