#!/bin/sh

uci -q batch <<-EOF >/dev/null
	delete ucitrack.@ssr_server[-1]
	add ucitrack ssr_server
	set ucitrack.@ssr_server[-1].init=ssr_server
	commit ucitrack
	delete firewall.ssrs
  add firewall rule 
  rename firewall.@rule[-1]="ssrs"
  set firewall.@rule[-1].name="ssrs"
  set firewall.@rule[-1].target="ACCEPT"
  set firewall.@rule[-1].src="wan"
  set firewall.@rule[-1].proto="tcp"
  set firewall.@rule[-1].dest_port="10240"
EOF

rm -f /tmp/luci-indexcache
exit 0
