mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-21 19:31:55 +00:00
16 lines
480 B
Bash
Executable File
16 lines
480 B
Bash
Executable File
#!/bin/sh
|
|
|
|
REDIRECTOR=$(cat /etc/ucentral/profile.json | jsonfilter -e '@.redirector')
|
|
if [ -n "$REDIRECTOR" ]; then
|
|
uci -c /etc/config-shadow/ set ucentral.config.server="$REDIRECTOR"
|
|
uci -c /etc/config-shadow/ commit ucentral
|
|
/etc/init.d/firstcontact disable
|
|
/etc/init.d/ucentral enable
|
|
else
|
|
rm /etc/ucentral/redirector.json
|
|
/etc/init.d/firstcontact enable
|
|
/etc/init.d/ucentral disable
|
|
fi
|
|
|
|
exit 0
|