test3 import ohne else

This commit is contained in:
Désiré Werner Menrath 2023-11-08 16:51:29 +01:00
parent 2e3646128b
commit 2ef17f7366

26
wire_g
View File

@ -91,30 +91,22 @@ import_wg(){
nmcli connection import type wireguard file $wgconf &> ${wg_wdir}.tmp.txt
wg_notify
elif [[ -z $active ]]
then
else
nmcli connection import type wireguard file $wgconf &> ${wg_wdir}.tmp.txt
wg_notify
else
yad --text-align=center --button=$"OK" --title=$"Wireguard .conf Select file" \
--image-on-top --image=${wg_pic}wg-info.png \
--fixed --center --buttons-layout=center --borders=8 \
--text $"<b>Oh, something went wrong.</b> \n
<b>No valid Wireguard file.</b> \n
<b>Here is an example:</b><span color='#0fad0a'><b> my_wireguard.conf</b></span> \n"
import_wg
fi
fi ;;
*) yad --text-align=center --button=$"OK" --title=$"Wireguard .conf Select file" \
--image-on-top --image=${wg_pic}wg-info.png \
--fixed --center --buttons-layout=center --borders=8 \
--text $"<b>Oh, something went wrong.</b> \n
*) yad --text-align=center --button=$"OK" --title=$"Wireguard .conf Select file" \
--image-on-top --image=${wg_pic}wg-info.png \
--fixed --center --buttons-layout=center --borders=8 \
--text $"<b>Oh, something went wrong.</b> \n
<b>No valid Wireguard file.</b> \n
<b>Here is an example:</b><span color='#0fad0a'><b> my_wireguard.conf</b></span> \n"
import_wg ;;
esac }
<b>Here is an example:</b><span color='#0fad0a'><b> my_wireguard.conf</b></span> \n" ;;
esac
import_wg
}
export -f import_wg
# function end