Files
MIXBOX-ARCHIVE/apps/npc/config/mixbox.conf
2020-03-05 00:08:40 +08:00

22 lines
758 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#------------------【NPC】--------------------
npc() {
eval `mbdb export npc`
source "$(mbdb get mixbox.main.path)"/bin/base
echo "********* $service ***********"
echo "[${appinfo}]"
readsh "启动${appname}服务[1/0] " "enable" "1"
if [ "$enable" == '1' ]; then
# Scripts Here
readsh "请输入npc连接命令" "connect_cmd"
# readsh "请输入${appname}外网访问配置[1/0]" "openport" "0"
readsh "重启${appname}服务[1/0] " "res" "1"
[ "$res" = '1' -o -z "$res" ] && ${mbroot}/apps/${appname}/scripts/${appname}.sh restart
else
${mbroot}/apps/${appname}/scripts/${appname}.sh stop
fi
}
#------------------【NPC】--------------------