test3 import ohne else
This commit is contained in:
parent
2e3646128b
commit
2ef17f7366
26
wire_g
26
wire_g
@ -91,30 +91,22 @@ import_wg(){
|
|||||||
nmcli connection import type wireguard file $wgconf &> ${wg_wdir}.tmp.txt
|
nmcli connection import type wireguard file $wgconf &> ${wg_wdir}.tmp.txt
|
||||||
wg_notify
|
wg_notify
|
||||||
|
|
||||||
elif [[ -z $active ]]
|
else
|
||||||
then
|
|
||||||
nmcli connection import type wireguard file $wgconf &> ${wg_wdir}.tmp.txt
|
nmcli connection import type wireguard file $wgconf &> ${wg_wdir}.tmp.txt
|
||||||
wg_notify
|
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
|
||||||
fi ;;
|
fi ;;
|
||||||
|
|
||||||
*) yad --text-align=center --button=$"OK" --title=$"Wireguard .conf Select file" \
|
*) yad --text-align=center --button=$"OK" --title=$"Wireguard .conf Select file" \
|
||||||
--image-on-top --image=${wg_pic}wg-info.png \
|
--image-on-top --image=${wg_pic}wg-info.png \
|
||||||
--fixed --center --buttons-layout=center --borders=8 \
|
--fixed --center --buttons-layout=center --borders=8 \
|
||||||
--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" ;;
|
||||||
import_wg ;;
|
esac
|
||||||
esac }
|
import_wg
|
||||||
|
}
|
||||||
export -f import_wg
|
export -f import_wg
|
||||||
|
|
||||||
# function end
|
# function end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user