#!/bin/sh /etc/rc.common

START=60

USE_PROCD=1

RESOLV_CONF_DIR=/var/gluon/wan-dnsmasq
RESOLV_CONF=$RESOLV_CONF_DIR/resolv.conf

start_service() {
	mkdir -p $RESOLV_CONF_DIR
	touch "$RESOLV_CONF"

	procd_open_instance
	procd_set_param command /usr/sbin/dnsmasq -u root -i lo -p 54 -h -k -c 0 -r $RESOLV_CONF
	procd_set_param env LD_PRELOAD=libpacketmark.so LIBPACKETMARK_MARK=1
	procd_set_param respawn 60 5 5
	procd_close_instance
}
