mirror of
https://codeberg.org/h3xx/you-dont-need-pihole.git
synced 2024-08-14 20:27:01 +00:00
Replace Slackware-specific dnsmasq restart
This commit is contained in:
parent
6f86038404
commit
65ade612e7
2 changed files with 14 additions and 2 deletions
|
@ -29,3 +29,14 @@
|
||||||
# OUT+=("$LIST_DIR/others.hosts")
|
# OUT+=("$LIST_DIR/others.hosts")
|
||||||
#OUT=()
|
#OUT=()
|
||||||
#URL=()
|
#URL=()
|
||||||
|
|
||||||
|
# What to run in order to restart dnsmasq. Leave empty to restart manually.
|
||||||
|
# Note: if you need shell features, use (bash -c '...')
|
||||||
|
# Typical value:
|
||||||
|
# Ubuntu/Debian/CentOS:
|
||||||
|
# DNSMASQ_RESTART_COMMAND=(service dnsmasq restart)
|
||||||
|
# Slackware:
|
||||||
|
# DNSMASQ_RESTART_COMMAND=(/etc/rc.d/rc.dnsmasq restart)
|
||||||
|
# Mac OSX (with homebrew):
|
||||||
|
# DNSMASQ_RESTART_COMMAND=(brew services restart dnsmasq)
|
||||||
|
#DNSMASQ_RESTART_COMMAND=()
|
||||||
|
|
|
@ -25,6 +25,7 @@ BLOCKLIST=$WORKDIR/block.list
|
||||||
LIST_DIR=$WORKDIR/lists
|
LIST_DIR=$WORKDIR/lists
|
||||||
OUT=()
|
OUT=()
|
||||||
URL=()
|
URL=()
|
||||||
|
DNSMASQ_RESTART_COMMAND=()
|
||||||
if [[ -f $CFG ]]; then
|
if [[ -f $CFG ]]; then
|
||||||
. "$CFG"
|
. "$CFG"
|
||||||
fi
|
fi
|
||||||
|
@ -90,6 +91,6 @@ if [[ -n $BACKUPSUFFIX && -f $BLOCKLIST$BACKUPSUFFIX ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -x /etc/rc.d/rc.dnsmasq ]]; then
|
if [[ ${#DNSMASQ_RESTART_COMMAND[@]} -gt 0 ]]; then
|
||||||
/etc/rc.d/rc.dnsmasq restart
|
"${DNSMASQ_RESTART_COMMAND[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue