加入自定义端口选项

pull/2/head
dovela 2018-06-27 00:18:13 +08:00 committed by GitHub
parent c292ef075d
commit b4429203a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 20 deletions

View File

@ -3,7 +3,7 @@
#=================================================
# System Required: CentOS 6+/Debian 6+/Ubuntu 14.04+/others(test)
# Description: Auto-install the ServerStatus Client
# Version: 1.0.1
# Version: 1.0.2
# Author: dovela
#=================================================
@ -38,6 +38,8 @@ debian_apt(){
install_sss(){
clear
stty erase '^H' && read -p " 服务端地址:" sserver
stty erase '^H' && read -p " 远程端口默认35601:" sport
[[ -z ${sport} ]] && sport="35601"
stty erase '^H' && read -p " 客户端username:" suser
stty erase '^H' && read -p " 客户端password:" spasswd
clear
@ -46,9 +48,11 @@ install_sss(){
echo 'ServerStatus客户端安装完成'
cd ServerStatus/clients
sed -i -e "s/sserver/$sserver/g" client-linux.py
sed -i -e "s/sport/$sport/g" client-linux.py
sed -i -e "s/suser/$suser/g" client-linux.py
sed -i -e "s/spasswd/$spasswd/g" client-linux.py
sed -i -e "s/sserver/$sserver/g" client-psutil.py
sed -i -e "s/sport/$sport/g" client-psutil.py
sed -i -e "s/suser/$suser/g" client-psutil.py
sed -i -e "s/spasswd/$spasswd/g" client-psutil.py
clear
@ -94,7 +98,7 @@ install_env(){
echo '依赖环境安装完成,请再次运行脚本'
}
clear
clear
check_sys
[ $(id -u) != "0" ] && echo -e "Error: You must be root to run this script" && exit 1
echo -e " 默认端口35601出现问题请在 https://github.com/dovela/ServerStatus1Click 处提issue