mirror of https://github.com/jumpserver/jumpserver
				
				
				
			[Update] 更新jms脚本
							parent
							
								
									759760e7d9
								
							
						
					
					
						commit
						a39424ac09
					
				
							
								
								
									
										14
									
								
								jms
								
								
								
								
							
							
						
						
									
										14
									
								
								jms
								
								
								
								
							| 
						 | 
				
			
			@ -80,10 +80,14 @@ def get_log_file_path(service):
 | 
			
		|||
 | 
			
		||||
def get_pid(service):
 | 
			
		||||
    pid_file = get_pid_file_path(service)
 | 
			
		||||
    pid = 0
 | 
			
		||||
    if os.path.isfile(pid_file):
 | 
			
		||||
        with open(pid_file) as f:
 | 
			
		||||
            return int(f.read().strip())
 | 
			
		||||
    return 0
 | 
			
		||||
            try:
 | 
			
		||||
                return int(f.read().strip())
 | 
			
		||||
            except ValueError:
 | 
			
		||||
                pass
 | 
			
		||||
    return pid
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def is_running(s, unlink=True):
 | 
			
		||||
| 
						 | 
				
			
			@ -282,9 +286,9 @@ if __name__ == '__main__':
 | 
			
		|||
    parser = argparse.ArgumentParser(
 | 
			
		||||
        description="""
 | 
			
		||||
        Jumpserver service control tools;
 | 
			
		||||
        
 | 
			
		||||
        Example: \r\n 
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
        Example: \r\n
 | 
			
		||||
 | 
			
		||||
        %(prog)s start all -d;
 | 
			
		||||
        """
 | 
			
		||||
    )
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue