17 lines
418 B
Bash
17 lines
418 B
Bash
#!/bin/sh
|
|
uci get xray.@general[-1] >/dev/null 2>&1 || uci add xray general >/dev/null 2>&1
|
|
uci commit xray
|
|
uci -q batch <<-EOF >/dev/null
|
|
delete ucitrack.@xray[-1]
|
|
add ucitrack xray
|
|
set ucitrack.@xray[-1].init=xray
|
|
commit ucitrack
|
|
delete firewall.xray
|
|
set firewall.xray=include
|
|
set firewall.xray.type=script
|
|
set firewall.xray.path=/var/etc/xray.include
|
|
set firewall.xray.reload=1
|
|
commit firewall
|
|
EOF
|
|
exit 0
|