Browse Source
Update zapret.init
add automatic lan name detection
pull/413/head
NewUse
10 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
5 additions and
1 deletions
-
docs/compile/openwrt/package/zapret/tpws/files/zapret.init
|
@ -1,5 +1,7 @@ |
|
|
#!/bin/sh /etc/rc.common |
|
|
#!/bin/sh /etc/rc.common |
|
|
|
|
|
|
|
|
|
|
|
. /lib/functions/network.sh |
|
|
|
|
|
|
|
|
USE_PROCD=1 |
|
|
USE_PROCD=1 |
|
|
# after network |
|
|
# after network |
|
|
START=21 |
|
|
START=21 |
|
@ -48,6 +50,7 @@ start_service() |
|
|
local lport |
|
|
local lport |
|
|
local fports |
|
|
local fports |
|
|
local blockq |
|
|
local blockq |
|
|
|
|
|
local ifname |
|
|
|
|
|
|
|
|
config_get opts tpws opts |
|
|
config_get opts tpws opts |
|
|
config_get pid tpws pid "tpws.pid" |
|
|
config_get pid tpws pid "tpws.pid" |
|
@ -69,7 +72,8 @@ start_service() |
|
|
procd_append_param command "$opts" |
|
|
procd_append_param command "$opts" |
|
|
|
|
|
|
|
|
procd_set_param pidfile "$PIDDIR/$pid" |
|
|
procd_set_param pidfile "$PIDDIR/$pid" |
|
|
procd_set_param netdev "br-lan" |
|
|
network_get_device ifname lan |
|
|
|
|
|
procd_set_param netdev "$ifname" |
|
|
|
|
|
|
|
|
procd_open_data |
|
|
procd_open_data |
|
|
|
|
|
|
|
|