mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	Conflicts: core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java scripts/vm/hypervisor/xenserver/vmops
		
			
				
	
	
		
			31 lines
		
	
	
		
			403 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			403 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/bash
 | |
| # Version @VERSION@
 | |
| 
 | |
| #set -x
 | |
|  
 | |
| usage() {
 | |
|   printf "Usage: %s [name label]  \n" $(basename $0) 
 | |
| }
 | |
| 
 | |
| if [ -z $1 ]; then
 | |
|   usage
 | |
|   echo "3#no namelabel"
 | |
|   exit 0
 | |
| else
 | |
|   namelabel=$1
 | |
| fi
 | |
| 
 | |
| pid=`ps -ef | grep "dd" | grep $namelabel | grep -v "grep" | awk '{print $2}'`
 | |
| if [ -z $pid ]; then
 | |
|   echo "true"
 | |
|   exit 0
 | |
| fi 
 | |
| 
 | |
| kill -9 $pid
 | |
| if [ $? -ne 0 ]; then
 | |
|   echo "false"
 | |
|   exit 0
 | |
| fi
 | |
| echo "true"
 | |
| exit 0
 |