fix: bugfix

This commit is contained in:
Fred Liang
2020-05-27 15:17:12 +08:00
parent b60fbdd92c
commit 995a79071a
6 changed files with 10 additions and 5 deletions

View File

@@ -194,7 +194,11 @@ remove_firewall_start(){
daemon() {
local binname="$(basename "${1}")"
$@ &> ${mbroot}/var/log/${binname}.log &
if type nohup >/dev/null 2>&1; then
nohup $@ &> ${mbroot}/var/log/${binname}.log &
else
$@ &> ${mbroot}/var/log/${binname}.log &
fi
return $?
}