mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-15 03:51:51 +00:00
30 lines
448 B
Text
30 lines
448 B
Text
|
#!/bin/sh /etc/rc.common
|
||
|
# shellcheck disable=SC2039
|
||
|
# vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 :
|
||
|
|
||
|
# shellcheck disable=SC2034
|
||
|
{
|
||
|
START=90
|
||
|
STOP=10
|
||
|
USE_PROCD=1
|
||
|
}
|
||
|
|
||
|
_bypass_ip() {
|
||
|
local ip="$1"
|
||
|
ipset add ss_rules_dst_bypass $ip
|
||
|
}
|
||
|
|
||
|
start_service() {
|
||
|
config_load omr-bypass
|
||
|
config_list_foreach ips "ip" _bypass_ip
|
||
|
}
|
||
|
|
||
|
service_triggers() {
|
||
|
procd_add_reload_trigger omr-bypass shadowsocks-libev
|
||
|
}
|
||
|
|
||
|
reload_service() {
|
||
|
stop
|
||
|
start
|
||
|
}
|