fff-vpn-select: do not configure peers on vpn-stop
There are two reasons why there should be no peers. Meshrouter without wan or no peers in hoodfile for a protocol. With this patch there is only one condition left for vpn-start-stop. Peers present or not. And it is less complicated to implement start/stop. Signed-off-by: Robert Langhammer <rlanghammer@web.de> Acked-by: Fabian Bläse <fabian@blaese.de>
This commit is contained in:
parent
2bc21aa63f
commit
8e127a3936
|
@ -24,6 +24,7 @@ done
|
||||||
|
|
||||||
# configure vpn
|
# configure vpn
|
||||||
|
|
||||||
|
if [ "$0" != "/usr/sbin/vpn-stop" ] ; then
|
||||||
if [ -n "$hoodfile" ] && [ -s "$hoodfile" ] ; then
|
if [ -n "$hoodfile" ] && [ -s "$hoodfile" ] ; then
|
||||||
json_load "$(cat "$hoodfile")"
|
json_load "$(cat "$hoodfile")"
|
||||||
json_select hood
|
json_select hood
|
||||||
|
@ -38,6 +39,7 @@ if [ -n "$hoodfile" ] && [ -s "$hoodfile" ] ; then
|
||||||
json_select ".." # back to vpn
|
json_select ".." # back to vpn
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# start/restart/stop vpnservices
|
# start/restart/stop vpnservices
|
||||||
for protocol in $supported_protocols; do
|
for protocol in $supported_protocols; do
|
||||||
|
|
Loading…
Reference in New Issue