#!/bin/sh
[ ! -f "/usr/share/ucitrack/luci-app-xl2tpd.json" ] && {
    cat > /usr/share/ucitrack/luci-app-xl2tpd.json << EEOF
{
    "config": "xl2tpd",
    "init": "xl2tpd"
}
EEOF
}

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

rm -f /tmp/luci-indexcache
exit 0
