Browse Source

add yxt/api-gateway.sh

master
lizw 4 years ago
parent
commit
11fe6e9b74
  1. 10
      yxt/api-gateway.sh

10
yxt/api-gateway.sh

@ -57,10 +57,8 @@ logs() {
} }
pid=`ps -ef | grep "DappName=${serverName}" | grep -v 'grep' | awk '{print $2}'` pid=`ps -ef | grep "DappName=${serverName}" | grep -v 'grep' | awk '{print $2}'`
# 操作参数: pull restart start stop kill log logs # 操作参数: restart start stop kill log logs
if [ "$cmd" == "pull" ];then if [ "$cmd" == "restart" ];then
deployPull $pid
elif [ "$cmd" == "restart" ];then
deployServer $pid deployServer $pid
elif [ "$cmd" == "start" ];then elif [ "$cmd" == "start" ];then
startServer $pid startServer $pid
@ -70,9 +68,9 @@ elif [ "$cmd" == "log" ] || [ "$cmd" == "logs" ];then
logs logs
else else
if [ -z $pid ];then if [ -z $pid ];then
echo "$serverName 未运行 | 输入操作参数: pull restart start stop kill log logs" echo "$serverName 未运行 | 输入操作参数: restart start stop kill log logs"
else else
echo "输入操作参数: pull restart start stop kill log logs" echo "输入操作参数: restart start stop kill log logs"
echo "pid=$pid | $serverName 正在运行... | 查看日志: tail -F $logPath -n 100" echo "pid=$pid | $serverName 正在运行... | 查看日志: tail -F $logPath -n 100"
fi fi
fi fi

Loading…
Cancel
Save