Skip to content
Snippets Groups Projects
Commit fc7cd560 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-legacy: gluon-mesh-vpn-fastd: correctly set enabled state

parent 4fa22836
No related branches found
No related tags found
No related merge requests found
......@@ -4,11 +4,13 @@
SECRET=
ENABLED=
for config in @legacy.fastd_configs@; do
if [ -z "$SECRET" ]; then
SECRET="$(uci_get fastd "$config" secret)"
ENABLED="$(uci_get fastd "$config" enabled)"
fi
uci_remove fastd "$config"
......@@ -17,6 +19,10 @@ done
if [ -n "$SECRET" ]; then
uci_add fastd fastd 'mesh_vpn'
uci_set fastd 'mesh_vpn' 'secret' "$SECRET"
if [ "$ENABLED" = 1 ]; then
uci_set fastd 'mesh_vpn' 'enabled' '1'
fi
fi
uci_commit fastd
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment