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,9 @@
-----------------------------------------------------
Welcome to MIXBOX!
-----------------------------------------------------
__ ______ __ ________ __ ____ ____ _ __
/ / / / _/ / |/ / _/ |/ // __ )/ __ \ |/ /
/ /_/ // / / /|_/ // / | // __ / / / / /
/ __ // / / / / // / / |/ /_/ / /_/ / |
/_/ /_/___/ /_/ /_/___//_/|_/_____/\____/_/|_|

View File

@@ -0,0 +1,8 @@
service="DropBear"
appname="dropbear"
needver="0.0.1"
backupfiles="bin/dropbear,config/dropbear_dss_host_key,config/dropbear_rsa_host_key"
supports="linux_arm,linux_mips"
appinfo="移植小米的SSH功能到工具箱"
newinfo="添加备份功能支持"
version="0.0.2"

View File

@@ -0,0 +1,26 @@
#------------------【DropBear】--------------------
dropbear() {
eval `mbdb export dropbear`
source "$(mbdb get mixbox.main.path)"/bin/base
echo "********* $service ***********"
echo "[${appinfo}]"
echo "[仅支持小米路由器!]"
readsh "启动${appname}服务[1/0] " "enable" "1"
if [ "$enable" == '1' ]; then
# Scripts Here
readsh "请输入${appname}端口号" "port" "1022"
read -p "【慎重】是否启动时修改root用户密码[1/0]? " modify_passwd
checkread $modify_passwd && mbdb set $appname.main.modify_passwd="$modify_passwd"
if [ "$modify_passwd" = '1' ]; then
readsh "请输入系统root用户密码" "rootpasswd"
fi
readsh "请输入${appname}外网访问配置[1/0]" "openport" "1"
${mbroot}/apps/${appname}/scripts/${appname}.sh restart
elif [ "$enable" = '0' ]; then
${mbroot}/apps/${appname}/scripts/${appname}.sh stop
fi
}
#------------------【DropBear】--------------------