blob: c4f52e27154e9b5a03a97ed4881a143389f7d7ef [file] [log] [blame]
Tarun Kundu12e3b2e2024-08-15 16:16:53 -07001#!/bin/sh
2
3. /usr/share/dnsmasq/init-system-common
4
5case "$1" in
6 checkconfig)
7 checkconfig
8 ;;
9 start-resolvconf)
10 start_resolvconf
11 ;;
12 stop-resolvconf)
13 stop_resolvconf
14 ;;
15 exec)
16 # /run may be volatile, so we need to ensure that
17 # /run/dnsmasq exists here as well as in postinst
18 if [ ! -d /run/dnsmasq ]; then
19 mkdir /run/dnsmasq || { [ -d /run/dnsmasq ] || exit 2 ; }
20 chown dnsmasq:nogroup /run/dnsmasq || exit 2
21 fi
22 exec ${DAEMON} -x /run/dnsmasq/${NAME}${INSTANCE:+.${INSTANCE}}.pid \
23 ${MAILHOSTNAME:+ -m ${MAILHOSTNAME}} \
24 ${MAILTARGET:+ -t ${MAILTARGET}} \
25 ${DNSMASQ_USER:+ -u ${DNSMASQ_USER}} \
26 ${DNSMASQ_INTERFACES:+ ${DNSMASQ_INTERFACES}} \
27 ${DHCP_LEASE:+ -l ${DHCP_LEASE}} \
28 ${DOMAIN_SUFFIX:+ -s ${DOMAIN_SUFFIX}} \
29 ${RESOLV_CONF:+ -r ${RESOLV_CONF}} \
30 ${CACHESIZE:+ -c ${CACHESIZE}} \
31 ${CONFIG_DIR:+ -7 ${CONFIG_DIR}} \
32 ${DNSMASQ_OPTS:+ ${DNSMASQ_OPTS}}
33 ;;
34esac