mirror of
https://github.com/monlor/MIXBOX-ARCHIVE.git
synced 2026-03-11 07:51:54 +00:00
26 lines
995 B
Plaintext
26 lines
995 B
Plaintext
#------------------【KodExplorer】--------------------
|
||
kodexplorer() {
|
||
|
||
eval `mbdb export kodexplorer`
|
||
source /etc/mixbox/bin/base
|
||
echo "********* $service ***********"
|
||
echo "[${appinfo}]"
|
||
echo "[如需使用ONMP请停止本插件]"
|
||
[ -z "$(mbdb show entware)" ] && echo "请先安装Entware插件!" && return
|
||
readsh "启动${appname}服务[1/0] " "enable" "1"
|
||
if [ "$enable" == '1' ]; then
|
||
read -p "修改${appname}端口号(`mbdb get ${appname}.main.port || echo 81`)?[1/0] " res
|
||
if [ "$res" == '1' ]; then
|
||
read -p "请输入${appname}端口号(默认81):" res
|
||
[ ! -z $res ] && mbdb set $appname.main.port="$res" || mbdb set $appname.main.port=81
|
||
fi
|
||
readsh "请输入${appname}管理目录" "path" "$mbdisk"
|
||
readsh "请输入${appname}外网访问配置[1/0]" "openport" "1"
|
||
|
||
${mbroot}/apps/${appname}/scripts/${appname}.sh restart
|
||
else
|
||
${mbroot}/apps/${appname}/scripts/${appname}.sh stop
|
||
fi
|
||
|
||
}
|
||
#------------------【KodExplorer】-------------------- |