Replace Slackware-specific dnsmasq restart

This commit is contained in:
Dan Church 2022-11-12 11:22:13 -06:00
parent 6f86038404
commit 65ade612e7
Signed by: h3xx
GPG Key ID: EA2BF379CD2CDBD0
2 changed files with 14 additions and 2 deletions

View File

@ -29,3 +29,14 @@
# OUT+=("$LIST_DIR/others.hosts")
#OUT=()
#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=()

View File

@ -25,6 +25,7 @@ BLOCKLIST=$WORKDIR/block.list
LIST_DIR=$WORKDIR/lists
OUT=()
URL=()
DNSMASQ_RESTART_COMMAND=()
if [[ -f $CFG ]]; then
. "$CFG"
fi
@ -90,6 +91,6 @@ if [[ -n $BACKUPSUFFIX && -f $BLOCKLIST$BACKUPSUFFIX ]]; then
fi
fi
if [[ -x /etc/rc.d/rc.dnsmasq ]]; then
/etc/rc.d/rc.dnsmasq restart
if [[ ${#DNSMASQ_RESTART_COMMAND[@]} -gt 0 ]]; then
"${DNSMASQ_RESTART_COMMAND[@]}"
fi