smartdns: support restart smartdns in docker.

This commit is contained in:
Nick Peng
2023-12-01 20:41:31 +08:00
parent 407aba08c5
commit fd2eb6980f
6 changed files with 118 additions and 34 deletions

View File

@@ -340,9 +340,12 @@ case "$1" in
exit 1
fi
SMARTDNS_OPTION=""
[ "$SMARTDNS_CRASH_RESTART" = "1" ] && SMARTDNS_OPTION="$SMARTDNS_OPTION -R"
set_smartdns_port
get_tz
$SMARTDNS_BIN -c "$SMARTDNS_CONF" -p $SMARTDNS_PID
$SMARTDNS_BIN -c "$SMARTDNS_CONF" -p $SMARTDNS_PID $SMARTDNS_OPTION
if [ $? -ne 0 ]; then
clear_rule
exit 1