#!/bin/sh
# Copyright (C) 2024 Tom <fjrcn@outlook.com>

/etc/init.d/modeminit enable
/etc/init.d/modem enable

uci -q batch <<-EOF >/dev/null
	delete ucitrack.@qmodem[-1]
	delete ucitrack.@qmodem[-1]
	add ucitrack qmodem
	set ucitrack.@qmodem[-1].init=qmodem_network
	add ucitrack qmodem
	set ucitrack.@qmodem[-1].init=qmodem_mwan
	commit ucitrack
EOF

if [ -f /www/luci-static/resources/luci.js ]; then 
  rm -f /usr/lib/lua/luci/view/admin_status/index/modem_overview.htm
fi

rm -rf /tmp/luci-*cache
exit 0
