mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 00:10:25 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			343 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			343 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#bin/bash
 | 
						|
 | 
						|
execfile=./mayfly-go
 | 
						|
 | 
						|
pid=`ps ax | grep -i 'mayfly-go' | grep -v grep | awk '{print $1}'`
 | 
						|
if [ ! -z "${pid}" ] ; then
 | 
						|
        echo "The mayfly-go already running, shutdown and restart..."
 | 
						|
        kill ${pid}
 | 
						|
fi
 | 
						|
 | 
						|
if [ ! -x "${execfile}" ]; then
 | 
						|
  sudo chmod +x "${execfile}"
 | 
						|
fi
 | 
						|
 | 
						|
nohup "${execfile}" &
 | 
						|
 | 
						|
echo "The mayfly-go running..." |