test 4 while
This commit is contained in:
parent
2ef17f7366
commit
af7c7bb1d1
7
wire_g
7
wire_g
@ -79,7 +79,8 @@ import_wg(){
|
|||||||
--window-icon=${wg_pic}wg-import.png \
|
--window-icon=${wg_pic}wg-import.png \
|
||||||
----filename=*.conf --no-click
|
----filename=*.conf --no-click
|
||||||
--title=$"Wireguard .conf Select file")
|
--title=$"Wireguard .conf Select file")
|
||||||
|
while [ ! $wgconf ]
|
||||||
|
do
|
||||||
case "$wgconf" in
|
case "$wgconf" in
|
||||||
|
|
||||||
*_*.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
|
||||||
@ -104,8 +105,8 @@ import_wg(){
|
|||||||
--text $"<b>Oh, something went wrong.</b> \n
|
--text $"<b>Oh, something went wrong.</b> \n
|
||||||
<b>No valid Wireguard file.</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" ;;
|
<b>Here is an example:</b><span color='#0fad0a'><b> my_wireguard.conf</b></span> \n" ;;
|
||||||
esac
|
esac
|
||||||
import_wg
|
done
|
||||||
}
|
}
|
||||||
export -f import_wg
|
export -f import_wg
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user