23 lines
319 B
Bash
Executable File
23 lines
319 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. /lib/functions.sh
|
|
|
|
|
|
SECRET=
|
|
|
|
|
|
for config in @legacy.fastd_configs@; do
|
|
if [ -z "$SECRET" ]; then
|
|
SECRET="$(uci_get fastd "$config" secret)"
|
|
fi
|
|
|
|
uci_remove fastd "$config"
|
|
done
|
|
|
|
if [ -n "$SECRET" ]; then
|
|
uci_add fastd fastd 'mesh_vpn'
|
|
uci_set fastd 'mesh_vpn' 'secret' "$SECRET"
|
|
fi
|
|
|
|
uci_commit fastd
|