Skip to content

Commit

Permalink
# 新增 升级脚本时,顺带更新服务脚本。
Browse files Browse the repository at this point in the history
  • Loading branch information
Toyo authored Jul 10, 2018
1 parent 0225331 commit 3273b88
Show file tree
Hide file tree
Showing 13 changed files with 133 additions and 39 deletions.
17 changes: 13 additions & 4 deletions aria2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ export PATH
#=================================================
# System Required: CentOS/Debian/Ubuntu
# Description: Aria2
# Version: 1.1.7
# Version: 1.1.8
# Author: Toyo
# Blog: https://doub.io/shell-jc4/
#=================================================
sh_ver="1.1.7"
sh_ver="1.1.8"
filepath=$(cd "$(dirname "$0")"; pwd)
file_1=$(echo -e "${filepath}"|awk -F "$0" '{print $1}')
file="/root/.aria2"
Expand Down Expand Up @@ -553,14 +553,23 @@ Set_iptables(){
}
Update_Shell(){
echo -e "当前版本为 [ ${sh_ver} ],开始检测最新版本..."
sh_new_ver=$(wget --no-check-certificate -qO- "https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/aria2.sh"|grep 'sh_ver="'|awk -F "=" '{print $NF}'|sed 's/\"//g'|head -1)
sh_new_ver=$(wget --no-check-certificate -qO- "https://softs.loan/Bash/aria2.sh"|grep 'sh_ver="'|awk -F "=" '{print $NF}'|sed 's/\"//g'|head -1) && sh_new_type="softs"
[[ -z ${sh_new_ver} ]] && sh_new_ver=$(wget --no-check-certificate -qO- "https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/aria2.sh"|grep 'sh_ver="'|awk -F "=" '{print $NF}'|sed 's/\"//g'|head -1) && sh_new_type="github"
[[ -z ${sh_new_ver} ]] && echo -e "${Error} 检测最新版本失败 !" && exit 0
if [[ ${sh_new_ver} != ${sh_ver} ]]; then
echo -e "发现新版本[ ${sh_new_ver} ],是否更新?[Y/n]"
stty erase '^H' && read -p "(默认: y):" yn
[[ -z "${yn}" ]] && yn="y"
if [[ ${yn} == [Yy] ]]; then
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/aria2.sh && chmod +x aria2.sh
if [[ -e "/etc/init.d/aria2" ]]; then
rm -rf /etc/init.d/aria2
Service_aria2
fi
if [[ ${sh_new_type} == "softs" ]]; then
wget -N --no-check-certificate https://softs.loan/Bash/aria2.sh && chmod +x aria2.sh
else
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/aria2.sh && chmod +x aria2.sh
fi
echo -e "脚本已更新为最新版本[ ${sh_new_ver} ] !"
else
echo && echo " 已取消..." && echo
Expand Down
10 changes: 7 additions & 3 deletions brook-pf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ export PATH
#=================================================
# System Required: CentOS/Debian/Ubuntu
# Description: Brook
# Version: 1.0.2
# Version: 1.0.3
# Author: Toyo
# Blog: https://doub.io/wlzy-jc37/
#=================================================

sh_ver="1.0.2"
sh_ver="1.0.3"
filepath=$(cd "$(dirname "$0")"; pwd)
file_1=$(echo -e "${filepath}"|awk -F "$0" '{print $1}')
file="/usr/local/brook-pf"
Expand Down Expand Up @@ -678,6 +678,10 @@ Update_Shell(){
stty erase '^H' && read -p "(默认: y):" yn
[[ -z "${yn}" ]] && yn="y"
if [[ ${yn} == [Yy] ]]; then
if [[ -e "/etc/init.d/brook-pf" ]]; then
rm -rf /etc/init.d/brook-pf
Service_brook
fi
if [[ $sh_new_type == "softs" ]]; then
wget -N --no-check-certificate https://softs.loan/Bash/brook-pf.sh && chmod +x brook.sh
else
Expand All @@ -702,7 +706,7 @@ else
${Green_font_prefix} 0.${Font_color_suffix} 升级脚本
————————————
${Green_font_prefix} 1.${Font_color_suffix} 安装 Brook
${Green_font_prefix} 2.${Font_color_suffix} 升级 Brook
${Green_font_prefix} 2.${Font_color_suffix} 更新 Brook
${Green_font_prefix} 3.${Font_color_suffix} 卸载 Brook
————————————
${Green_font_prefix} 4.${Font_color_suffix} 启动 Brook
Expand Down
8 changes: 6 additions & 2 deletions brook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ export PATH
#=================================================
# System Required: CentOS/Debian/Ubuntu
# Description: Brook
# Version: 1.1.10
# Version: 1.1.11
# Author: Toyo
# Blog: https://doub.io/brook-jc3/
#=================================================

sh_ver="1.1.10"
sh_ver="1.1.11"
filepath=$(cd "$(dirname "$0")"; pwd)
file_1=$(echo -e "${filepath}"|awk -F "$0" '{print $1}')
file="/usr/local/brook"
Expand Down Expand Up @@ -677,6 +677,10 @@ Update_Shell(){
stty erase '^H' && read -p "(默认: y):" yn
[[ -z "${yn}" ]] && yn="y"
if [[ ${yn} == [Yy] ]]; then
if [[ -e "/etc/init.d/brook" ]]; then
rm -rf /etc/init.d/brook
Service_brook
fi
if [[ ${sh_new_type} == "softs" ]]; then
wget -N --no-check-certificate https://softs.loan/Bash/brook.sh && chmod +x brook.sh
else
Expand Down
42 changes: 38 additions & 4 deletions cloudt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ export PATH
#=================================================
# System Required: CentOS/Debian/Ubuntu
# Description: Cloud Torrent
# Version: 1.2.2
# Version: 1.2.3
# Author: Toyo
# Blog: https://doub.io/wlzy-12/
#=================================================

sh_ver="1.2.3"
file="/usr/local/cloudtorrent"
ct_file="/usr/local/cloudtorrent/cloud-torrent"
dl_file="/usr/local/cloudtorrent/downloads"
Expand Down Expand Up @@ -344,7 +345,37 @@ Set_iptables(){
chmod +x /etc/network/if-pre-up.d/iptables
fi
}
echo && echo -e "请输入一个数字来选择选项
Update_Shell(){
echo -e "当前版本为 [ ${sh_ver} ],开始检测最新版本..."
sh_new_ver=$(wget --no-check-certificate -qO- "https://softs.loan/Bash/cloudt.sh"|grep 'sh_ver="'|awk -F "=" '{print $NF}'|sed 's/\"//g'|head -1) && sh_new_type="softs"
[[ -z ${sh_new_ver} ]] && sh_new_ver=$(wget --no-check-certificate -qO- "https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/cloudt.sh"|grep 'sh_ver="'|awk -F "=" '{print $NF}'|sed 's/\"//g'|head -1) && sh_new_type="github"
[[ -z ${sh_new_ver} ]] && echo -e "${Error} 检测最新版本失败 !" && exit 0
if [[ ${sh_new_ver} != ${sh_ver} ]]; then
echo -e "发现新版本[ ${sh_new_ver} ],是否更新?[Y/n]"
stty erase '^H' && read -p "(默认: y):" yn
[[ -z "${yn}" ]] && yn="y"
if [[ ${yn} == [Yy] ]]; then
if [[ -e "/etc/init.d/cloudt" ]]; then
rm -rf /etc/init.d/cloudt
Service_brook
fi
if [[ ${sh_new_type} == "softs" ]]; then
wget -N --no-check-certificate https://softs.loan/Bash/cloudt.sh && chmod +x cloudt.sh
else
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/cloudt.sh && chmod +x cloudt.sh
fi
echo -e "脚本已更新为最新版本[ ${sh_new_ver} ] !"
else
echo && echo " 已取消..." && echo
fi
else
echo -e "当前已是最新版本[ ${sh_new_ver} ] !"
fi
}
echo && echo -e " Cloud Torrent 一键管理脚本 ${Red_font_prefix}[v${sh_ver}]${Font_color_suffix}
---- Toyo | doub.io/wlzy-12/ ----
${Green_font_prefix}0.${Font_color_suffix} 升级脚本
${Green_font_prefix}1.${Font_color_suffix} 安装 Cloud Torrent
${Green_font_prefix}2.${Font_color_suffix} 升级 Cloud Torrent
Expand All @@ -369,8 +400,11 @@ else
echo -e " 当前状态: ${Red_font_prefix}未安装${Font_color_suffix}"
fi
echo
stty erase '^H' && read -p " 请输入数字 [1-9]:" num
stty erase '^H' && read -p " 请输入数字 [0-9]:" num
case "$num" in
0)
Update_Shell
;;
1)
Install_ct
;;
Expand Down Expand Up @@ -399,6 +433,6 @@ case "$num" in
Log_ct
;;
*)
echo "请输入正确数字 [1-9]"
echo "请输入正确数字 [0-9]"
;;
esac
17 changes: 13 additions & 4 deletions dowsdns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ export PATH
#=================================================
# System Required: CentOS/Debian/Ubuntu
# Description: DowsDNS
# Version: 1.0.7
# Version: 1.0.8
# Author: Toyo
# Blog: https://doub.io/dowsdns-jc3/
#=================================================

sh_ver="1.0.7"
sh_ver="1.0.8"
file="/usr/local/dowsDNS"
dowsdns_conf="/usr/local/dowsDNS/conf/config.json"
dowsdns_data="/usr/local/dowsDNS/conf/hosts_repository_config.json"
Expand Down Expand Up @@ -538,14 +538,23 @@ View_Log(){
}
Update_Shell(){
echo -e "当前版本为 [ ${sh_ver} ],开始检测最新版本..."
sh_new_ver=$(wget --no-check-certificate -qO- softs.loan/Bash/dowsdns.sh|grep 'sh_ver="'|awk -F "=" '{print $NF}'|sed 's/\"//g'|head -1)
sh_new_ver=$(wget --no-check-certificate -qO- "https://softs.loan/Bash/dowsdns.sh"|grep 'sh_ver="'|awk -F "=" '{print $NF}'|sed 's/\"//g'|head -1) && sh_new_type="softs"
[[ -z ${sh_new_ver} ]] && sh_new_ver=$(wget --no-check-certificate -qO- "https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/dowsdns.sh"|grep 'sh_ver="'|awk -F "=" '{print $NF}'|sed 's/\"//g'|head -1) && sh_new_type="github"
[[ -z ${sh_new_ver} ]] && echo -e "${Error} 检测最新版本失败 !" && exit 0
if [[ ${sh_new_ver} != ${sh_ver} ]]; then
echo -e "发现新版本[ ${sh_new_ver} ],是否更新?[Y/n]"
stty erase '^H' && read -p "(默认: y):" yn
[[ -z "${yn}" ]] && yn="y"
if [[ ${yn} == [Yy] ]]; then
wget -N --no-check-certificate "https://softs.loan/Bash/dowsdns.sh" && chmod +x dowsdns.sh
if [[ -e "/etc/init.d/dowsdns" ]]; then
rm -rf /etc/init.d/dowsdns
Service_dowsdns
fi
if [[ ${sh_new_type} == "softs" ]]; then
wget -N --no-check-certificate https://softs.loan/Bash/dowsdns.sh && chmod +x dowsdns.sh
else
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/dowsdns.sh && chmod +x dowsdns.sh
fi
echo -e "脚本已更新为最新版本[ ${sh_new_ver} ] !"
else
echo && echo " 已取消..." && echo
Expand Down
8 changes: 6 additions & 2 deletions goflyway.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ export PATH
#=================================================
# System Required: CentOS/Debian/Ubuntu
# Description: GoFlyway
# Version: 1.0.7
# Version: 1.0.8
# Author: Toyo
# Blog: https://doub.io/goflyway-jc2/
#=================================================

sh_ver="1.0.7"
sh_ver="1.0.8"
filepath=$(cd "$(dirname "$0")"; pwd)
file_1=$(echo -e "${filepath}"|awk -F "$0" '{print $1}')
Folder="/usr/local/goflyway"
Expand Down Expand Up @@ -561,6 +561,10 @@ Update_Shell(){
stty erase '^H' && read -p "(默认: y):" yn
[[ -z "${yn}" ]] && yn="y"
if [[ ${yn} == [Yy] ]]; then
if [[ -e "/etc/init.d/goflyway" ]]; then
rm -rf /etc/init.d/goflyway
Service_goflyway
fi
if [[ $sh_new_type == "softs" ]]; then
wget -N --no-check-certificate https://softs.loan/Bash/goflyway.sh && chmod +x goflyway.sh
else
Expand Down
8 changes: 6 additions & 2 deletions lightsocks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ export PATH
#=================================================
# System Required: CentOS/Debian/Ubuntu
# Description: Lightsocks
# Version: 1.0.0
# Version: 1.0.1
# Author: Toyo
# Blog: https://doub.io/lightsocks-jc1/
#=================================================

sh_ver="1.0.0"
sh_ver="1.0.1"
filepath=$(cd "$(dirname "$0")"; pwd)
file_1=$(echo -e "${filepath}"|awk -F "$0" '{print $1}')
file="/usr/local/lightsocks"
Expand Down Expand Up @@ -542,6 +542,10 @@ Update_Shell(){
stty erase '^H' && read -p "(默认: y):" yn
[[ -z "${yn}" ]] && yn="y"
if [[ ${yn} == [Yy] ]]; then
if [[ -e "/etc/init.d/lightsocks" ]]; then
rm -rf /etc/init.d/lightsocks
Service_lightsocks
fi
if [[ ${sh_new_type} == "softs" ]]; then
wget -N --no-check-certificate https://softs.loan/Bash/lightsocks.sh && chmod +x lightsocks.sh
else
Expand Down
8 changes: 6 additions & 2 deletions mtproxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ export PATH
#=================================================
# System Required: CentOS/Debian/Ubuntu
# Description: MTProxy
# Version: 1.0.3
# Version: 1.0.4
# Author: Toyo
# Blog: https://doub.io/shell-jc7/
#=================================================

sh_ver="1.0.3"
sh_ver="1.0.4"
filepath=$(cd "$(dirname "$0")"; pwd)
file_1=$(echo -e "${filepath}"|awk -F "$0" '{print $1}')
file="/usr/local/mtproxy"
Expand Down Expand Up @@ -600,6 +600,10 @@ Update_Shell(){
stty erase '^H' && read -p "(默认: y):" yn
[[ -z "${yn}" ]] && yn="y"
if [[ ${yn} == [Yy] ]]; then
if [[ -e "/etc/init.d/mtproxy" ]]; then
rm -rf /etc/init.d/mtproxy
Service_mtproxy
fi
if [[ ${sh_new_type} == "softs" ]]; then
wget -N --no-check-certificate https://softs.loan/Bash/mtproxy.sh && chmod +x mtproxy.sh
else
Expand Down
19 changes: 14 additions & 5 deletions ocserv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ export PATH
#=================================================
# System Required: Debian/Ubuntu
# Description: ocserv AnyConnect
# Version: 1.0.3
# Version: 1.0.4
# Author: Toyo
# Blog: https://doub.io/vpnzy-7/
#=================================================
sh_ver="1.0.3"
sh_ver="1.0.4"
file="/usr/local/sbin/ocserv"
conf_file="/etc/ocserv"
conf="/etc/ocserv/ocserv.conf"
Expand Down Expand Up @@ -491,14 +491,23 @@ Set_iptables(){
}
Update_Shell(){
echo -e "当前版本为 [ ${sh_ver} ],开始检测最新版本..."
sh_new_ver=$(wget --no-check-certificate -qO- "https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/ocserv.sh"|grep 'sh_ver="'|awk -F "=" '{print $NF}'|sed 's/\"//g'|head -1)
[[ -z ${sh_new_ver} ]] && echo -e "${Error} 检测最新版本失败 !" && exit 1
sh_new_ver=$(wget --no-check-certificate -qO- "https://softs.loan/Bash/ocserv.sh"|grep 'sh_ver="'|awk -F "=" '{print $NF}'|sed 's/\"//g'|head -1) && sh_new_type="softs"
[[ -z ${sh_new_ver} ]] && sh_new_ver=$(wget --no-check-certificate -qO- "https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/ocserv.sh"|grep 'sh_ver="'|awk -F "=" '{print $NF}'|sed 's/\"//g'|head -1) && sh_new_type="github"
[[ -z ${sh_new_ver} ]] && echo -e "${Error} 检测最新版本失败 !" && exit 0
if [[ ${sh_new_ver} != ${sh_ver} ]]; then
echo -e "发现新版本[ ${sh_new_ver} ],是否更新?[Y/n]"
stty erase '^H' && read -p "(默认: y):" yn
[[ -z "${yn}" ]] && yn="y"
if [[ ${yn} == [Yy] ]]; then
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/ocserv.sh && chmod +x ocserv.sh
if [[ -e "/etc/init.d/ocserv" ]]; then
rm -rf /etc/init.d/ocserv
Service_ocserv
fi
if [[ $sh_new_type == "softs" ]]; then
wget -N --no-check-certificate https://softs.loan/Bash/ocserv.sh && chmod +x ocserv.sh
else
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/ocserv.sh && chmod +x ocserv.sh
fi
echo -e "脚本已更新为最新版本[ ${sh_new_ver} ] !"
else
echo && echo " 已取消..." && echo
Expand Down
8 changes: 6 additions & 2 deletions ssr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ export PATH
#=================================================
# System Required: CentOS 6+/Debian 6+/Ubuntu 14.04+
# Description: Install the ShadowsocksR server
# Version: 2.0.37
# Version: 2.0.38
# Author: Toyo
# Blog: https://doub.io/ss-jc42/
#=================================================

sh_ver="2.0.37"
sh_ver="2.0.38"
filepath=$(cd "$(dirname "$0")"; pwd)
file=$(echo -e "${filepath}"|awk -F "$0" '{print $1}')
ssr_folder="/usr/local/shadowsocksr"
Expand Down Expand Up @@ -1421,6 +1421,10 @@ Update_Shell(){
stty erase '^H' && read -p "(默认: y):" yn
[[ -z "${yn}" ]] && yn="y"
if [[ ${yn} == [Yy] ]]; then
if [[ -e "/etc/init.d/ssr" ]]; then
rm -rf /etc/init.d/ssr
Service_SSR
fi
if [[ $sh_new_type == "softs" ]]; then
wget -N --no-check-certificate https://softs.loan/Bash/ssr.sh && chmod +x ssr.sh
else
Expand Down
8 changes: 6 additions & 2 deletions ssrmu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ export PATH
#=================================================
# System Required: CentOS 6+/Debian 6+/Ubuntu 14.04+
# Description: Install the ShadowsocksR mudbjson server
# Version: 1.0.25
# Version: 1.0.26
# Author: Toyo
# Blog: https://doub.io/ss-jc60/
#=================================================

sh_ver="1.0.25"
sh_ver="1.0.26"
filepath=$(cd "$(dirname "$0")"; pwd)
file=$(echo -e "${filepath}"|awk -F "$0" '{print $1}')
ssr_folder="/usr/local/shadowsocksr"
Expand Down Expand Up @@ -1773,6 +1773,10 @@ Update_Shell(){
stty erase '^H' && read -p "(默认: y):" yn
[[ -z "${yn}" ]] && yn="y"
if [[ ${yn} == [Yy] ]]; then
if [[ -e "/etc/init.d/ssrmu" ]]; then
rm -rf /etc/init.d/ssrmu
Service_SSR
fi
cd "${file}"
if [[ $sh_new_type == "softs" ]]; then
wget -N --no-check-certificate https://softs.loan/Bash/ssrmu.sh && chmod +x ssrmu.sh
Expand Down
Loading

0 comments on commit 3273b88

Please sign in to comment.