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

30 lines
1.3 KiB
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.
#------------------【FastDick】--------------------
fastdick() {
eval `mbdb export fastdick`
source /etc/mixbox/bin/base
echo "********* $service ***********"
echo "[${appinfo}]"
[ -z "$(mbdb show entware)" ] && echo "请先安装Entware插件" && return
readsh "启动${appname}服务[1/0] " "enable" "1"
if [ "$enable" == '1' ]; then
uid=$(mbdb get ${appname}.main.uid) || uid="空"
pwd=$(mbdb get ${appname}.main.pwd) || pwd="空"
peerid=$(mbdb get ${appname}.main.peerid) || peerid="空"
echo "[请按https://github.com/fffonion/Xunlei-Fastdick这里的教程运行swjsq.py并找到运行成功后生成的swjsq_wget.sh文件复制其所有内容编辑到配置里]"
read -p "修改${appname}配置(将开始使用vim编辑快鸟运行脚本)[1/0]" res
if [ "$res" == '1' ]; then
echo "[提示]按i开始编辑编辑完按ESC键再按:wq即可保存退出[注意冒号]"
read -p "清空文件之后再编辑?[1/0]" res
[ "$res" = '1' ] && cat /dev/null > ${mbroot}/apps/${appname}/bin/${appname}
vim ${mbroot}/apps/${appname}/bin/${appname}
fi
readsh "请输入${appname}外网访问配置[1/0]" "openport" "1"
${mbroot}/apps/${appname}/scripts/${appname}.sh restart
else
${mbroot}/apps/${appname}/scripts/${appname}.sh stop
fi
}
#------------------【FastDick】--------------------