Skip to content

Commit 478e6cb

Browse files
author
Toyo
authored
# v1.2.2
1 parent 11c8cc8 commit 478e6cb

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

cloudt.sh

+10-10
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export PATH
55
#=================================================
66
# System Required: CentOS/Debian/Ubuntu
77
# Description: Cloud Torrent
8-
# Version: 1.2.1
8+
# Version: 1.2.2
99
# Author: Toyo
1010
# Blog: https://doub.io/wlzy-12/
1111
#=================================================
@@ -121,25 +121,25 @@ Installation_dependency(){
121121
}
122122
Write_config(){
123123
cat > ${ct_conf}<<-EOF
124-
host=${ct_host}
125-
port=${ct_port}
126-
user=${ct_user}
127-
passwd=${ct_passwd}
124+
host = ${ct_host}
125+
port = ${ct_port}
126+
user = ${ct_user}
127+
passwd = ${ct_passwd}
128128
EOF
129129
}
130130
Read_config(){
131131
[[ ! -e ${ct_conf} ]] && echo -e "${Error} Cloud Torrent 配置文件不存在 !" && exit 1
132-
host=`cat ${ct_conf}|grep "host"|awk -F "host=" '{print $NF}'`
133-
port=`cat ${ct_conf}|grep "port"|awk -F "port=" '{print $NF}'`
134-
user=`cat ${ct_conf}|grep "user"|awk -F "user=" '{print $NF}'`
135-
passwd=`cat ${ct_conf}|grep "passwd"|awk -F "passwd=" '{print $NF}'`
132+
host=`cat ${ct_conf}|grep "host = "|awk -F "host = " '{print $NF}'`
133+
port=`cat ${ct_conf}|grep "port = "|awk -F "port = " '{print $NF}'`
134+
user=`cat ${ct_conf}|grep "user = "|awk -F "user = " '{print $NF}'`
135+
passwd=`cat ${ct_conf}|grep "passwd = "|awk -F "passwd = " '{print $NF}'`
136136
}
137137
Set_host(){
138138
echo -e "请输入 Cloud Torrent 监听域名或IP(当你要绑定域名前,记得先做好域名解析,目前只支持http://访问,不要写http://,只写域名!)"
139139
stty erase '^H' && read -p "(默认: 0.0.0.0 监听网卡所有IP):" ct_host
140140
[[ -z "${ct_host}" ]] && ct_host="0.0.0.0"
141141
echo && echo "========================"
142-
echo -e " 端口 : ${Red_background_prefix} ${ct_host} ${Font_color_suffix}"
142+
echo -e " 主机 : ${Red_background_prefix} ${ct_host} ${Font_color_suffix}"
143143
echo "========================" && echo
144144
}
145145
Set_port(){

0 commit comments

Comments
 (0)