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

@@ -30,7 +30,7 @@ start () {
logsh "$service" "正在启动${appname}服务... "
# open_port
# write_firewall_start
${mbroot}/apps/${appname}/bin/${appname} &> ${mbroot}/var/log/${appname}.log &
daemon ${mbroot}/apps/${appname}/bin/${appname}
logsh "$service" "启动${appname}服务完成!"

View File

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

View File

@@ -401,6 +401,7 @@ ipset_rules() {
echo "ipset=/.microsoft.com/customize_white" >> ${mbtmp}/wblist.conf
fi
#黑白名单规则
mkdir /tmp/etc/dnsmasq.d/
if [ "$ss_mode" = "whitelist" -o "$ssg_mode" = "frgame" -o "$ss_mode" = "homemode" ]; then
sed -e "s/^/-A nogfwnet &/g" -e "1 i\-N nogfwnet hash:net" ${mbroot}/apps/${appname}/config/chnroute.txt | ipset -R -!
elif [ "$ss_mode" = "gfwlist" -o "$ssg_mode" = "cngame" ]; then

View File

@@ -21,7 +21,7 @@ mburl="https://monlor.coding.net/p/mbfiles/d/mbfiles/git/lfs/master"
mbtmp="/tmp/mbtmp"
[ ! -d "${mbtmp}" ] && mkdir -p ${mbtmp}
model=$(uname -ms | tr ' ' '_' | tr '[A-Z]' '[a-z]')
[ -n "$(echo $model | grep -E "linux.*aarch.*")" ] && model="linux_arm"
[ -n "$(echo $model | grep -E "linux.*aarch.*")" ] && model="linux_aarch64"
[ -n "$(echo $model | grep -E "linux.*arm.*")" ] && model="linux_arm"
[ -n "$(echo $model | grep -E "linux.*mips.*")" ] && model="linux_mips"
[ -n "$(echo $model | grep -E "linux.*x86_64.*")" ] && model="linux_x86_64"

View File

@@ -21,7 +21,7 @@ mburl="https://raw.githubusercontent.com/monlor/mbfiles/master"
mbtmp="/tmp/mbtmp"
[ ! -d "${mbtmp}" ] && mkdir -p ${mbtmp}
model=$(uname -ms | tr ' ' '_' | tr '[A-Z]' '[a-z]')
[ -n "$(echo $model | grep -E "linux.*aarch.*")" ] && model="linux_arm"
[ -n "$(echo $model | grep -E "linux.*aarch.*")" ] && model="linux_aarch64"
[ -n "$(echo $model | grep -E "linux.*arm.*")" ] && model="linux_arm"
[ -n "$(echo $model | grep -E "linux.*mips.*")" ] && model="linux_mips"
[ -n "$(echo $model | grep -E "linux.*x86_64.*")" ] && model="linux_x86_64"

View File

@@ -37,7 +37,7 @@ rm -rf ${mbroot}/bin/base64*
if [ -z "$(mbdb get mixbox.main.model)" ]; then
model=$(uname -ms | tr ' ' '_' | tr '[A-Z]' '[a-z]')
[ -n "$(echo $model | grep -E "linux.*aarch.*")" ] && model="linux_arm"
[ -n "$(echo $model | grep -E "linux.*aarch.*")" ] && model="linux_aarch64"
[ -n "$(echo $model | grep -E "linux.*arm.*")" ] && model="linux_arm"
[ -n "$(echo $model | grep -E "linux.*mips.*")" ] && model="linux_mips"
mbdb set mixbox.main.model="$model"