mirror of https://github.com/cppla/ServerStatus
加入自定义端口选项
parent
c292ef075d
commit
b4429203a4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue