mirror of
https://github.com/bol-van/zapret.git
synced 2025-02-20 20:12:22 +03:00
Update zapret.init
add automatic lan name detection
This commit is contained in:
parent
58e8ce3f44
commit
a8d8450230
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user