mirror of
https://github.com/monlor/MIXBOX-ARCHIVE.git
synced 2026-03-14 17:31:35 +00:00
moxbox init
This commit is contained in:
41
apps/filebrowser/config/mixbox.conf
Normal file
41
apps/filebrowser/config/mixbox.conf
Normal file
@@ -0,0 +1,41 @@
|
||||
#------------------【FileBrowser】--------------------
|
||||
filebrowser() {
|
||||
|
||||
eval `mbdb export filebrowser`
|
||||
source /etc/mixbox/bin/base
|
||||
uciset="mbdb set $appname.main"
|
||||
echo "********* $service ***********"
|
||||
echo "[${appinfo}]"
|
||||
readsh "启动${appname}服务[1/0] " "enable" "1"
|
||||
|
||||
if [ "$enable" == '1' ]; then
|
||||
# Scripts Here
|
||||
[ -z "${port}" ] && port=1086
|
||||
read -p "修改${appname}端口号(${port})?[1/0] " res
|
||||
if [ "$res" == '1' ]; then
|
||||
read -p "请输入端口号:" res
|
||||
[ -n "$res" ] && mbdb set $appname.main.port="$res"
|
||||
fi
|
||||
[ -z "$scope" ] && scope="$mbdisk"
|
||||
read -p "修改${appname}默认访问路径($scope)?[1/0] " res
|
||||
if [ "$res" == '1' ]; then
|
||||
while(true)
|
||||
do
|
||||
read -p "请输入默认访问路径:" res
|
||||
[ -z "$res" ] && break
|
||||
if [ ! -d "$res" ]; then
|
||||
echo "输入的路径不存在!"
|
||||
else
|
||||
[ -n "$res" ] && mbdb set $appname.main.scope="$res"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
readsh "请输入${appname}外网访问配置[1/0]" "openport" "1"
|
||||
${mbroot}/apps/${appname}/scripts/${appname}.sh restart
|
||||
else
|
||||
${mbroot}/apps/${appname}/scripts/${appname}.sh stop
|
||||
fi
|
||||
|
||||
}
|
||||
#------------------【FileBrowser】--------------------
|
||||
Reference in New Issue
Block a user