luci-app-flowoffload/luci-app-sfe: use "&" instead of daemon mode for dnscache

This commit is contained in:
CN_SZTL 2019-12-15 11:23:46 +08:00
parent e3c50181da
commit b2635bf47d
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
4 changed files with 11 additions and 11 deletions

View File

@ -129,7 +129,7 @@ EOF
[ -d /var/sbin ] || mkdir -p /var/sbin
[ -f /var/sbin/dnscache ] || cp -a /usr/sbin/pdnsd /var/sbin/dnscache
/usr/sbin/dnscache -c /var/etc/dnscache.conf -d
/usr/sbin/dnscache -c /var/etc/dnscache.conf &
echo "Start DNS Cache"
}
@ -185,7 +185,7 @@ DomainStatisticTempletFile
StatisticUpdateInterval 29
EOF
dnscache -f $DNSCACHE_CONF -d
dnscache -f $DNSCACHE_CONF &
echo dnscache running pid is $pid
}
@ -238,7 +238,7 @@ start_service(){
elif [ $dnscache_enable = "2" ]; then
start_dnsforwarder
elif [ $dnscache_enable = "3" ]; then
AdGuardHome -c /etc/AdGuardHome/AdGuardHome.yaml -w /etc/AdGuardHome -h ${lan_addr} -p 3001 2>&1 &
AdGuardHome -c /etc/AdGuardHome/AdGuardHome.yaml -w /etc/AdGuardHome -h ${lan_addr} -p 3001 &
fi
change_dns
nohup /usr/share/dnscache/dnscache-while.sh > /var/log/dnscache.file 2>&1 &

View File

@ -34,9 +34,9 @@ if [ $dns_enable -eq 1 ]; then
else
if ! pidof dnscache>/dev/null; then
if [ $dnscache_enable = "1" ];then
/usr/sbin/dnscache -c /var/etc/dnscache.conf -d
/usr/sbin/dnscache -c /var/etc/dnscache.conf &
elif [ $dnscache_enable = "2" ];then
dnscache -f /var/run/dnscache/dnscache.conf -d
dnscache -f /var/run/dnscache/dnscache.conf &
fi
echo "$curtime 重启服务!" >> ${logfile}
fi

View File

@ -130,7 +130,7 @@ EOF
[ -d /var/sbin ] || mkdir -p /var/sbin
[ -f /var/sbin/dnscache ] || cp -a /usr/sbin/pdnsd /var/sbin/dnscache
/usr/sbin/dnscache -c /var/etc/dnscache.conf -d
/usr/sbin/dnscache -c /var/etc/dnscache.conf &
echo "Start DNS Cache"
}
@ -185,7 +185,7 @@ DomainStatisticTempletFile
StatisticUpdateInterval 29
EOF
dnscache -f $DNSCACHE_CONF -d
dnscache -f $DNSCACHE_CONF &
logger -t alex the pid of dnscache is $PID_PATH/$PID_FILE $pid
}
@ -259,7 +259,7 @@ start_service() {
elif [ $dnscache_enable = "2" ]; then
start_dnsforwarder
elif [ $dnscache_enable = "3" ]; then
AdGuardHome -c /etc/AdGuardHome/AdGuardHome.yaml -w /etc/AdGuardHome 2>&1 &
AdGuardHome -c /etc/AdGuardHome/AdGuardHome.yaml -w /etc/AdGuardHome &
fi
change_dns
nohup /usr/share/dnscache/dnscache-while.sh > /var/log/dnscache.file 2>&1 &

View File

@ -29,15 +29,15 @@ echo "$curtime online! "
if [ $dns_enable -eq 1 ]; then
if [ $dnscache_enable = "3" ]; then
if ! pidof AdGuardHome>/dev/null; then
AdGuardHome -c /etc/AdGuardHome/AdGuardHome.yaml -w /etc/AdGuardHome 2>&1 &
AdGuardHome -c /etc/AdGuardHome/AdGuardHome.yaml -w /etc/AdGuardHome &
echo "$curtime 重启服务!" >> ${logfile}
fi
else
if ! pidof dnscache>/dev/null; then
if [ $dnscache_enable = "1" ]; then
/usr/sbin/dnscache -c /var/etc/dnscache.conf -d
/usr/sbin/dnscache -c /var/etc/dnscache.conf &
elif [ $dnscache_enable = "2" ]; then
dnscache -f /var/run/dnscache/dnscache.conf -d
dnscache -f /var/run/dnscache/dnscache.conf &
fi
echo "$curtime 重启服务!" >> ${logfile}
fi