forked from freifunk-franken/firmware
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,7 +24,8 @@ done
|
|||
|
||||
# configure vpn
|
||||
|
||||
if [ -n "$hoodfile" ] && [ -s "$hoodfile" ] ; then
|
||||
if [ "$0" != "/usr/sbin/vpn-stop" ] ; then
|
||||
if [ -n "$hoodfile" ] && [ -s "$hoodfile" ] ; then
|
||||
json_load "$(cat "$hoodfile")"
|
||||
json_select hood
|
||||
json_get_var id id
|
||||
|
@ -37,6 +38,7 @@ if [ -n "$hoodfile" ] && [ -s "$hoodfile" ] ; then
|
|||
"${protocol}_addpeer"
|
||||
json_select ".." # back to vpn
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
# start/restart/stop vpnservices
|
||||
|
|
Loading…
Reference in New Issue