#!/bin/sh

uci -q batch <<-EOF >/dev/null
	delete firewall.softethervpn
	set firewall.softethervpn=include
	set firewall.softethervpn.type=script
	set firewall.softethervpn.path=/var/etc/softethervpn.include
	set firewall.softethervpn.reload=1
EOF

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

/etc/init.d/softethervpnserver stop
/etc/init.d/softethervpnserver disable

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