Files

19 lines
394 B
Bash

#!/bin/sh
[ ! -f "/usr/share/ucitrack/luci-app-switchmode.json" ] && {
cat > /usr/share/ucitrack/luci-app-switchmode.json << EEOF
{
"config": "switchmode",
"init": "switchmode"
}
EEOF
}
uci -q batch <<-EOF >/dev/null
delete ucitrack.@switchmode[-1]
add ucitrack switchmode
add_list ucitrack.@switchmode[-1].affects=network
commit ucitrack
EOF
rm -f /tmp/luci-indexcache
exit 0