diff --git a/applist.txt b/applist.txt index 36a58fe..084affb 100644 --- a/applist.txt +++ b/applist.txt @@ -19,12 +19,12 @@ mixbox|一款支持多平台,多架构的Shell工具箱|修复由于mbdb导致 ngrok|轻量级的内网穿透工具||0.0.2|Ngrok|linux_arm,linux_mips pptpd|简单但并不安全的VPN服务器||0.0.2|PPTPD|linux_arm,linux_mips,linux_x86_64 qiandao|koolshare merlin 自动签到程序||0.0.2|QianDao|linux_arm,linux_x86_64 -shadowsocks|最好的翻墙工具,没有之一,还可以加速国内外游戏|1.修复回国模式的未添加ipset规则的bug,\n\ 2.修复其余设备运行模式一直显示科学上网的bug\n\ 3.修复vray配置文件安全方式为空时的错误|0.0.7|ShadowSocks|linux_arm,linux_mips,linux_x86_64 +shadowsocks|最好的翻墙工具,没有之一,还可以加速国内外游戏|1.修复回国模式的未添加ipset规则的bug\n\ 2.修复其余设备运行模式一直显示科学上网的bug\n\ 3.修复vray配置文件安全方式为空时的错误|0.0.7|ShadowSocks|linux_arm,linux_mips,linux_x86_64 smartdns|DNS加速工具,从多个上游DNS服务器查询,避免DS污染|更新smartdns程序版本|0.0.3|SmartDNS|linux_arm,linux_mips,linux_x86_64 ssserver|快速搭建ss服务端程序||0.0.2|SSServer|linux_arm,linux_x86_64 tinyproxy|轻量级的Http代理工具||0.0.2|TinyProxy|linux_arm,linux_mips,linux_x86_64 transmission|一款BT下载神器||0.0.3|Transmission|linux_arm,linux_mips,linux_x86_64 -verysync|基于p2p的文件同步工具,局域网同步速度快||0.0.3|VerySync|linux_arm,linux_mips,linux_x86_64 +verysync|基于p2p的文件同步工具,局域网同步速度快||0.0.4|VerySync|linux_arm,linux_mips,linux_x86_64 vsftpd|快速搭建Ftp服务器,局域网文件共享||0.0.3|VsFtpd|linux_arm,linux_mips,linux_x86_64 webd|一款只有40k大小的mini个人网盘||0.0.2|WebD|linux_arm,linux_mips,linux_x86_64,darwin_linux_x86_64 webshell|网页ssh工具,可在网页上管理路由器||0.0.2|WebShell|linux_arm,linux_mips,linux_x86_64 diff --git a/apps/mixbox/bin/base b/apps/mixbox/bin/base index 6acf9ec..db9ef3a 100644 --- a/apps/mixbox/bin/base +++ b/apps/mixbox/bin/base @@ -178,7 +178,7 @@ readsh() { mbdb set $appname.main.$uciname="$default" || echo "设置key:"$uciname"等于value:"$default"出错!" fi else - if [ "$uciname" = "port" -a -n "$(netstat -tunpl 2> /dev/null | grep -w "$res")" ]; then + if [ "$uciname" = "port" ] && [ -n "$(netstat -tunpl 2> /dev/null | grep -w "$res")" ]; then echo "端口已被占用!请重新输入!" readsh $@ else diff --git a/apps/shadowsocks/config/shadowsocks.uci b/apps/shadowsocks/config/shadowsocks.uci index bf958d8..2a9414f 100644 --- a/apps/shadowsocks/config/shadowsocks.uci +++ b/apps/shadowsocks/config/shadowsocks.uci @@ -5,7 +5,7 @@ supports="linux_arm,linux_mips,linux_x86_64" openport="1" backupfiles="config/ssserver.conf,config/sscontrol.conf,config/customize_black.conf,config/customize_white.conf" appinfo="最好的翻墙工具,没有之一,还可以加速国内外游戏" -newinfo="1.修复回国模式的未添加ipset规则的bug,\n\ +newinfo="1.修复回国模式的未添加ipset规则的bug\n\ 2.修复其余设备运行模式一直显示科学上网的bug\n\ 3.修复vray配置文件安全方式为空时的错误" version="0.0.7" diff --git a/apps/verysync/config/verysync.uci b/apps/verysync/config/verysync.uci index 543966b..eb08637 100644 --- a/apps/verysync/config/verysync.uci +++ b/apps/verysync/config/verysync.uci @@ -4,4 +4,4 @@ needver="0.0.1" supports="linux_arm,linux_mips,linux_x86_64" appinfo="基于p2p的文件同步工具,局域网同步速度快" newinfo="" -version="0.0.3" +version="0.0.4" diff --git a/apps/verysync/scripts/verysync.sh b/apps/verysync/scripts/verysync.sh index 71ed5cf..210fec9 100644 --- a/apps/verysync/scripts/verysync.sh +++ b/apps/verysync/scripts/verysync.sh @@ -22,10 +22,10 @@ start () { logsh "【$service】" "正在启动${appname}服务... " cru a "${appname}" "0 6 * * * ${mbroot}/apps/${appname}/scripts/${appname}.sh restart" [ -f "${mbroot}/apps/${appname}/bin/${appname}".old ] && rm -rf "${mbroot}/apps/${appname}/bin/${appname}".old - [ ! -d "${mbroot}/apps/${appname}/config" ] && mkdir ${mbroot}/apps/${appname}/config + [ ! -d "${CONF}" ] && mkdir ${CONF} open_ports write_firewall_start - daemon ${mbroot}/apps/${appname}/bin/${appname} -home "${mbroot}/apps/${appname}/config" -gui-address :${port} -no-browser -logfile ${mbroot}/var/log/${appname}.log + daemon ${mbroot}/apps/${appname}/bin/${appname} -home "${CONF}" -gui-address :${port} -no-browser -logfile ${mbroot}/var/log/${appname}.log if [ $? -ne 0 ]; then logsh "【$service】" "启动${appname}服务失败!" else @@ -42,7 +42,7 @@ stop () { close_port remove_firewall_start killall -9 ${appname} &> /dev/null - logsh "【$service】" "卸载插件后可删除${mbroot}/apps/${appname}/config文件夹" + logsh "【$service】" "卸载插件后可删除${CONF}文件夹" [ "$enable" == '0' ] && destroy } diff --git a/apps/vsftpd/config/mixbox.conf b/apps/vsftpd/config/mixbox.conf index 768cc72..7531855 100644 --- a/apps/vsftpd/config/mixbox.conf +++ b/apps/vsftpd/config/mixbox.conf @@ -53,10 +53,10 @@ vsftpd() { [ "$res" == '1' ] && vsftpdAdd read -p "删除${appname}用户?[1/0] " res [ "$res" == '1' ] && vsftpdDel - # if [ "$(mbdb get entware.main.enable)" = '1' ]; then - # readsh "使用entware安装插件程序[1/0]" "entware" "1" - # [ "$entware" = '1' ] && mv ${mbroot}/apps/${appname}/bin/${appname} ${mbroot}/apps/${appname}/bin/${appname}.bak &> /dev/null - # fi + if [ "$(mbdb get entware.main.enable)" = '1' ]; then + readsh "使用entware安装插件程序[1/0]" "entware" "1" + # [ "$entware" = '1' ] && mv ${mbroot}/apps/${appname}/bin/${appname} ${mbroot}/apps/${appname}/bin/${appname}.bak &> /dev/null + fi readsh "请输入${appname}外网访问配置[1/0]" "openport" "1" ${mbroot}/apps/${appname}/scripts/${appname}.sh restart diff --git a/apps/vsftpd/config/vsftpd.conf b/apps/vsftpd/config/vsftpd.conf index 3f6ce2c..afad45e 100644 --- a/apps/vsftpd/config/vsftpd.conf +++ b/apps/vsftpd/config/vsftpd.conf @@ -9,7 +9,7 @@ anon_umask=022 check_shell=NO allow_writeable_chroot=YES session_support=NO -userlist_file=/etc/vsftpd.users +userlist_file=/etc/mixbox/apps/vsftpd/config/vsftpd.users xferlog_file=/etc/mixbox/var/log/vsftpd.log deny_file={*.scr} write_enable=YES diff --git a/apps/vsftpd/scripts/vsftpd.sh b/apps/vsftpd/scripts/vsftpd.sh index ef3ca39..bebeaaa 100644 --- a/apps/vsftpd/scripts/vsftpd.sh +++ b/apps/vsftpd/scripts/vsftpd.sh @@ -5,6 +5,13 @@ eval `mbdb export vsftpd` port=21 FTPUSER=${mbroot}/apps/vsftpd/config/ftpuser.conf # binname="${appname} ${appname}-ext" +userpath=/etc/mixbox/apps/vsftpd/config/vsftpd.users +[ "$entware" = '1' ] && configpath=/opt/etc/vsftpd/vsftpd.conf || configpath=/etc/vsftpd.conf + +[ ! -d /var/run/vsftpd ] && mkdir -p /var/run/vsftpd +[ -z "$port" ] && port=21 +[ -z "$anon_root" ] && anon_root=/var/ftp +[ ! -f "${configpath}" ] && touch ${configpath} add(){ sed -i "/$1/"d /etc/passwd @@ -25,7 +32,7 @@ add(){ del(){ sed -i "/^$1/"d /etc/passwd sed -i "/^$1/"d /etc/shadow - sed -i "/^$1/"d /etc/vsftpd.users &> /dev/null + sed -i "/^$1/"d ${userpath} &> /dev/null } # init_mount() { @@ -41,7 +48,7 @@ set_config() { logsh "【$service】" "加载${appname}设置... " [ ! -f $FTPUSER ] && logsh "【$service】" "未配置ftp用户!" && exit - cat /etc/vsftpd.users 2> /dev/null | while read line + cat ${userpath} 2> /dev/null | while read line do [ ! -z "${line}" ] && del ${line} done @@ -50,13 +57,12 @@ set_config() { username=`cutsh ${line} 1` passwd=`cutsh ${line} 2` ftppath=`cutsh ${line} 3` - echo $username >> /etc/vsftpd.users + echo $username >> ${userpath} [ ! -z $username ] && add $username $passwd $ftppath done - if [ `mbdb get ${appname}.main.anon_enable` = "1" ]; then + if [ "$anon_enable" = "1" ]; then anon_enable=YES - anon_root=`mbdb get ${appname}.main.anon_root` || anon_root=/var/ftp [ ! -d $anon_root ] && mkdir -p $anon_root [ ! -d $anon_root/Share ] && mkdir -p $anon_root/Share chmod 755 $anon_root @@ -67,10 +73,9 @@ set_config() { else anon_enable=NO fi - port=`mbdb get ${appname}.main.ftp_port` || port=21 - cp -rf ${mbroot}/apps/${appname}/config/${appname}.conf /etc/vsftpd.conf - [ ! -d /var/run/vsftpd ] && mkdir -p /var/run/vsftpd - echo -e "anonymous_enable=$anon_enable\nanon_root=$anon_root\nlisten_port=${port}" >> /etc/vsftpd.conf + + mount --bind ${mbroot}/apps/${appname}/config/${appname}.conf ${configpath} + echo -e "anonymous_enable=$anon_enable\nanon_root=$anon_root\nlisten_port=${port}" >> ${configpath} } @@ -82,16 +87,16 @@ start () { exit 1 fi logsh "【$service】" "正在启动${appname}服务... " - # if [ ! -f ${mbroot}/apps/${appname}/bin/${appname} ]; then - # bincheck ${binname} - # if [ $? -eq 0 ]; then - # logsh "【$service】" "安装程序成功,链接程序到工具箱..." - # ln -sf $(which $binname) ${mbroot}/apps/${appname}/bin/${appname} - # else - # logsh "【$service】" "程序安装失败!" - # end - # fi - # fi + if [ ! -f ${mbroot}/apps/${appname}/bin/${appname} ]; then + bincheck ${binname} + if [ $? -eq 0 ]; then + logsh "【$service】" "安装程序成功,链接程序到工具箱..." + ln -sf $(which $binname) ${mbroot}/apps/${appname}/bin/${appname} + else + logsh "【$service】" "程序安装失败!" + end + fi + fi # init_mount set_config @@ -112,11 +117,11 @@ stop () { close_port remove_firewall_start # 删除用户 - cat /etc/vsftpd.users 2> /dev/null | while read line + cat ${userpath} 2> /dev/null | while read line do [ ! -z "${line}" ] && del ${line} done - rm -rf /etc/vsftpd.conf + rm -rf ${configpath} killall -9 ${appname} &> /dev/null diff --git a/appstore/history/mixbox_darwin_x86_64.tar.gz b/appstore/history/mixbox_darwin_x86_64.tar.gz index 76cf2c1..cab348b 100644 Binary files a/appstore/history/mixbox_darwin_x86_64.tar.gz and b/appstore/history/mixbox_darwin_x86_64.tar.gz differ diff --git a/appstore/history/mixbox_linux_arm.tar.gz b/appstore/history/mixbox_linux_arm.tar.gz index 96ac738..0870e20 100644 Binary files a/appstore/history/mixbox_linux_arm.tar.gz and b/appstore/history/mixbox_linux_arm.tar.gz differ diff --git a/appstore/history/mixbox_linux_mips.tar.gz b/appstore/history/mixbox_linux_mips.tar.gz index 74b3c96..d2cfaa8 100644 Binary files a/appstore/history/mixbox_linux_mips.tar.gz and b/appstore/history/mixbox_linux_mips.tar.gz differ diff --git a/appstore/history/mixbox_linux_x86_64.tar.gz b/appstore/history/mixbox_linux_x86_64.tar.gz index ef08a18..eaf220a 100644 Binary files a/appstore/history/mixbox_linux_x86_64.tar.gz and b/appstore/history/mixbox_linux_x86_64.tar.gz differ diff --git a/appstore/history/verysync_linux_arm.tar.gz b/appstore/history/verysync_linux_arm.tar.gz index c025ea1..626ece1 100644 Binary files a/appstore/history/verysync_linux_arm.tar.gz and b/appstore/history/verysync_linux_arm.tar.gz differ diff --git a/appstore/history/verysync_linux_mips.tar.gz b/appstore/history/verysync_linux_mips.tar.gz index ff4d136..024c782 100644 Binary files a/appstore/history/verysync_linux_mips.tar.gz and b/appstore/history/verysync_linux_mips.tar.gz differ diff --git a/appstore/history/verysync_linux_x86_64.tar.gz b/appstore/history/verysync_linux_x86_64.tar.gz index 1152c01..3f5a5e2 100644 Binary files a/appstore/history/verysync_linux_x86_64.tar.gz and b/appstore/history/verysync_linux_x86_64.tar.gz differ diff --git a/appstore/mixbox_darwin_x86_64.tar.gz b/appstore/mixbox_darwin_x86_64.tar.gz index cab348b..6f27b16 100644 Binary files a/appstore/mixbox_darwin_x86_64.tar.gz and b/appstore/mixbox_darwin_x86_64.tar.gz differ diff --git a/appstore/mixbox_linux_arm.tar.gz b/appstore/mixbox_linux_arm.tar.gz index 0870e20..0a09dfa 100644 Binary files a/appstore/mixbox_linux_arm.tar.gz and b/appstore/mixbox_linux_arm.tar.gz differ diff --git a/appstore/mixbox_linux_mips.tar.gz b/appstore/mixbox_linux_mips.tar.gz index d2cfaa8..94686de 100644 Binary files a/appstore/mixbox_linux_mips.tar.gz and b/appstore/mixbox_linux_mips.tar.gz differ diff --git a/appstore/mixbox_linux_x86_64.tar.gz b/appstore/mixbox_linux_x86_64.tar.gz index eaf220a..0574988 100644 Binary files a/appstore/mixbox_linux_x86_64.tar.gz and b/appstore/mixbox_linux_x86_64.tar.gz differ diff --git a/appstore/verysync_linux_arm.tar.gz b/appstore/verysync_linux_arm.tar.gz index 626ece1..418ce15 100644 Binary files a/appstore/verysync_linux_arm.tar.gz and b/appstore/verysync_linux_arm.tar.gz differ diff --git a/appstore/verysync_linux_mips.tar.gz b/appstore/verysync_linux_mips.tar.gz index 024c782..1eb95b0 100644 Binary files a/appstore/verysync_linux_mips.tar.gz and b/appstore/verysync_linux_mips.tar.gz differ diff --git a/appstore/verysync_linux_x86_64.tar.gz b/appstore/verysync_linux_x86_64.tar.gz index 3f5a5e2..8ad515f 100644 Binary files a/appstore/verysync_linux_x86_64.tar.gz and b/appstore/verysync_linux_x86_64.tar.gz differ diff --git a/install.sh b/install.sh index 5694436..50d1fba 100644 --- a/install.sh +++ b/install.sh @@ -17,7 +17,7 @@ logsh "【Tools】" "请按任意键安装工具箱(Ctrl + C 退出)." read answer #check root # [ "$USER" != "root" ] && logsh "【Tools】" "请使用root用户安装工具箱!" && exit 1 -mburl="https://dev.tencent.com/u/monlor/p/MIXBOX-BETA/git/raw/master" +mburl="https://raw.githubusercontent.com/MIXBOX/master" mbtmp="/tmp/mbtmp" [ ! -d "${mbtmp}" ] && mkdir -p ${mbtmp} model=$(uname -ms | tr ' ' '_' | tr '[A-Z]' '[a-z]')