wlan-ap-Telecominfraproject/feeds/tip/luci/luci-mod-ucentral/root/sbin/profileupdate
John Crispin 0e5ec91a12 luci: start using the upstream feed and move the maverick packages into the tree
Fixes: WIFI-4911
Signed-off-by: John Crispin <john@phrozen.org>
2021-10-13 13:01:39 +02:00

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