2014-07-20 01:25:22 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
|
|
|
|
|
|
|
START=60
|
|
|
|
|
|
|
|
SERVICE_NAME=gluon-wan-dnsmasq
|
|
|
|
SERVICE_USE_PID=1
|
|
|
|
SERVICE_PID_FILE=/var/run/gluon-wan-dnsmasq.pid
|
|
|
|
|
|
|
|
|
|
|
|
PORT=54
|
|
|
|
PACKET_MARK=1
|
|
|
|
|
|
|
|
RESOLV_CONF_DIR=/var/gluon/wan-dnsmasq
|
|
|
|
RESOLV_CONF=$RESOLV_CONF_DIR/resolv.conf
|
|
|
|
|
|
|
|
|
|
|
|
start() {
|
|
|
|
mkdir -p $RESOLV_CONF_DIR
|
2014-08-09 12:29:24 +00:00
|
|
|
/lib/gluon/wan-dnsmasq/update.lua
|
2014-07-20 01:25:22 +00:00
|
|
|
|
2015-08-04 20:51:40 +00:00
|
|
|
export LD_PRELOAD=libpacketmark.so
|
|
|
|
export LIBPACKETMARK_MARK=$PACKET_MARK
|
|
|
|
|
|
|
|
service_start /usr/sbin/dnsmasq -x $SERVICE_PID_FILE -u root -i lo -p $PORT -h -r $RESOLV_CONF
|
2014-07-20 01:25:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
service_stop /usr/sbin/dnsmasq
|
|
|
|
}
|