gluon-wan-dnsmasq 500 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh /etc/rc.common
  2. START=60
  3. SERVICE_NAME=gluon-wan-dnsmasq
  4. SERVICE_USE_PID=1
  5. SERVICE_PID_FILE=/var/run/gluon-wan-dnsmasq.pid
  6. PORT=54
  7. PACKET_MARK=1
  8. RESOLV_CONF_DIR=/var/gluon/wan-dnsmasq
  9. RESOLV_CONF=$RESOLV_CONF_DIR/resolv.conf
  10. start() {
  11. mkdir -p $RESOLV_CONF_DIR
  12. touch $RESOLV_CONF
  13. LD_PRELOAD=libpacketmark.so LIBPACKETMARK_MARK=$PACKET_MARK service_start /usr/sbin/dnsmasq -x $SERVICE_PID_FILE -u root -i lo -p $PORT -h -r $RESOLV_CONF
  14. }
  15. stop() {
  16. service_stop /usr/sbin/dnsmasq
  17. }