34 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/bin/bash
 | |
| cd $(cd "$(dirname "$0")" && pwd)
 | |
| path=`pwd`
 | |
| ./stop.sh
 | |
| 
 | |
| echo "======================【启动】========================"
 | |
| if [ "$1" == "Debug" ]; then
 | |
|     dm='_d'
 | |
| else
 | |
|     dm='_r'
 | |
| fi
 | |
| 
 | |
| datetime=`date "+%Y-%m-%d.%H:%M:%S"`
 | |
| 
 | |
| echo "["$datetime"] 正在启动 DB 服务器 [dbserver$dm]..."
 | |
| $path/DBServer/dbserver$dm $path/DBServer/DBServerLinux.txt > /dev/null &
 | |
| echo "执行命令:$path/DBServer/dbserver$dm $path/DBServer/DBServerLinux.txt"
 | |
| 
 | |
| echo "["$datetime"] 正在启动 Logic 服务器 [logicserver$dm]..."
 | |
| $path/LogicServer/logicserver$dm $path/LogicServer/LogicServerLinux.txt > /dev/null &
 | |
| echo "执行命令:$path/LogicServer/logicserver$dm $path/LogicServer/LogicServerLinux.txt"
 | |
| 
 | |
| echo "["$datetime"] 正在启动 Gateway 服务器 [gateway$dm]..."
 | |
| $path/Gateway/gateway$dm $path/Gateway/GateWay.txt > /dev/null &
 | |
| echo "执行命令:$path/Gateway/gateway$dm $path/Gateway/GateWay.txt"
 | |
| 
 | |
| #echo "["$datetime"] 正在启动 Robot 服务器 [robot$dm]..."
 | |
| #$path/LogicServer/robot$dm
 | |
| #echo "执行命令:$path/LogicServer/robot$dm"
 | |
| 
 | |
| echo "["$datetime"] 正在启动 守护进程..."
 | |
| nohup $path/daemon.sh "$dm" "$path" &
 | |
| echo $datetime" 服务器启用完成!"
 |