Fix startup failure on openwrt issue

This commit is contained in:
Nick Peng
2018-07-25 23:59:04 +08:00
parent 8cff251065
commit 1d0695ff7f
5 changed files with 18 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2018 Nick Peng (pymumu@gmail.com)
START=50
START=90
SERVICE_USE_PID=1
SERVICE_WRITE_PID=1
SERVICE_DAEMONIZE=1
@@ -68,6 +68,8 @@ start_service() {
conf_append "bind" "[::]:$port"
SMARTDNS_PORT="$port"
mkdir -p $(dirname $SMARTDNS_CONF)
config_get "cache_size" "$section" "cache_size" ""
if [ ! -z "$cache_size" ]; then
conf_append "cache-size" "$cache_size"