main
PC-202302260912\Administrator 2023-07-25 15:54:07 +08:00
parent 90966634c3
commit 7c0155a0ac
1 changed files with 4 additions and 19 deletions

23
main.sh
View File

@ -1,5 +1,8 @@
#!/bin/bash
#删除命令乱码解决
stty erase ^h
# 定义ANSI颜色转义码
RED='\033[0;31m' #红色
GREEN='\033[0;32m' #绿色
@ -114,10 +117,8 @@ game(){
1)
echo -e "${YELLOW}打包${NC}"
show_file project
stty erase ^h
read -p "请输入项目地址: " project
show_file package
stty erase ^h
read -p "请输入包名(不需要带文件后缀): " package
echo -e "开始打包 项目:$project, 包名:$package"
bash update_game.sh $project $package
@ -126,9 +127,7 @@ game(){
2)
echo -e "${YELLOW}单独发送${NC}"
show_file package
stty erase ^h
read -p "请输入包名(不需要带文件后缀): " package
stty erase ^h
read -p "请输入游戏服ip: " ip
echo -e "开始发送 包名:$package, ip$ip"
send_one_ip $package $ip
@ -137,10 +136,8 @@ game(){
3)
echo -e "${YELLOW}渠道发送${NC}"
show_file package
stty erase ^h
read -p "请输入包名(不需要带文件后缀): " package
show_file script/txt
stty erase ^h
read -p "请输入文件名称(不需要带文件后缀): " iptxt
echo -e "开始发送 包名:$package, 渠道:$iptxt"
send_many_ip $package $iptxt
@ -149,9 +146,7 @@ game(){
4)
echo -e "${YELLOW}单独发送并重启${NC}"
show_file package
stty erase ^h
read -p "请输入包名(不需要带文件后缀): " package
stty erase ^h
read -p "请输入游戏服ip: " ip
echo -e "开始发送 包名:$package, ip$ip"
send_one_ip $package $ip
@ -161,10 +156,8 @@ game(){
5)
echo -e "${YELLOW}渠道发送并重启${NC}"
show_file package
stty erase ^h
read -p "请输入包名(不需要带文件后缀): " package
show_file script/txt
stty erase ^h
read -p "请输入文件名称(不需要带文件后缀): " iptxt
echo -e "开始发送 包名:$package, 渠道:$iptxt"
send_many_ip $package $iptxt
@ -193,9 +186,7 @@ gm(){
1)
echo -e "${YELLOW}单渠道更新${NC}"
show_file project
stty erase ^h
read -p "请输入表所在游戏项目地址: " project
stty erase ^h
read -p "请输入gm服ip: " ip
echo -e "开始更新gm ip$ip"
bash update_gm.sh $project $ip
@ -204,7 +195,7 @@ gm(){
2)
echo -e "${YELLOW}多渠道更新${NC}"
show_file project
stty erase ^h
read -p "请输入项目地址: " project
echo -e "开始更新gm"
bash update_gm.sh $project
@ -232,7 +223,6 @@ login(){
case $choice in
1)
echo -e "${YELLOW}登陆服更新${NC}"
stty erase ^h
read -p "请输入登陆服ip: " ip
echo -e "开始更新登陆服 ip$ip"
bash update_login.sh $ip
@ -240,7 +230,6 @@ login(){
;;
2)
echo -e "${YELLOW}登陆服重启${NC}"
stty erase ^h
read -p "请输入登陆服ip: " ip
echo -e "开始重启登陆服 ip$ip"
ssh $ip "bash /usr/local/apache-tomcat-7.0.79/bin/shutdown.sh"
@ -271,7 +260,6 @@ pay(){
case $choice in
1)
echo -e "${YELLOW}支付服更新${NC}"
stty erase ^h
read -p "请输入支付服ip: " ip
echo -e "开始更新支付服 ip$ip"
bash update_delivery.sh $ip
@ -279,7 +267,6 @@ pay(){
;;
2)
echo -e "${YELLOW}支付服重启${NC}"
stty erase ^h
read -p "请输入支付服ip: " ip
echo -e "开始重启支付服 ip$ip"
ssh $ip "bash /data/jieling/delivery-server/pay_restart.sh"
@ -308,7 +295,6 @@ mingan(){
case $choice in
1)
echo -e "${YELLOW}敏感词服更新${NC}"
stty erase ^h
read -p "请输入敏感词服ip: " ip
echo -e "开始更新敏感词服 ip$ip"
bash update_sensitive.sh $ip
@ -316,7 +302,6 @@ mingan(){
;;
2)
echo -e "${YELLOW}敏感词服重启${NC}"
stty erase ^h
read -p "请输入敏感词服ip: " ip
echo -e "开始重启敏感词服 ip$ip"
ssh $ip "bash /data/jieling/sensitiveWordFilter/bin/mingan_reboot.sh"