moxbox init

This commit is contained in:
monlor
2020-03-05 00:08:40 +08:00
commit 76dbe98978
856 changed files with 170708 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
#------------------【MIWIFI】--------------------
miwifi() {
eval `mbdb export miwifi`
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
read -p "修改小米路由器samba路径($samba_path)[1/0] " res
if [ "$res" = '1' ]; then
read -p "请输入samba路径(回车即可恢复默认)" res
mbdb set $appname.main.samba_path="$res"
fi
read -p "禁用小米路由器更新($miwifi_noupdate)[1/0] " res
[ -n "$res" ] && mbdb set $appname.main.miwifi_noupdate="$res"
read -p "禁用小米路由器自带的迅雷程序($xunlei_disable)[1/0] " res
[ -n "$res" ] && mbdb set $appname.main.xunlei_disable="$res"
read -p "是否修复小米路由器远程访问端口8098($remote_web)[1/0] " res
[ -n "$res" ] && mbdb set $appname.main.remote_web="$res"
${mbroot}/apps/${appname}/scripts/${appname}.sh restart
else
${mbroot}/apps/${appname}/scripts/${appname}.sh stop
fi
}
#------------------【MIWIFI】--------------------