gluon-wan-dnsmasq 532 B

1234567891011121314151617181920212223242526272829
  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. /lib/gluon/wan-dnsmasq/update.lua
  13. export LD_PRELOAD=libpacketmark.so
  14. export LIBPACKETMARK_MARK=$PACKET_MARK
  15. service_start /usr/sbin/dnsmasq -x $SERVICE_PID_FILE -u root -i lo -p $PORT -h -r $RESOLV_CONF
  16. }
  17. stop() {
  18. service_stop /usr/sbin/dnsmasq
  19. }