#!/bin/sh

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

	delete firewall.linkease
	set firewall.linkease=rule
	set firewall.linkease.name="linkease"
	set firewall.linkease.target="ACCEPT"
	set firewall.linkease.src="wan"
	set firewall.linkease.proto="tcp"
	set firewall.linkease.dest_port="8897"
	commit firewall
EOF

/etc/init.d/linkease enable
/etc/init.d/linkease start

exit 0