Changes in structure
This commit is contained in:
		
							
								
								
									
										30
									
								
								opennebula/opennebula-flow
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								opennebula/opennebula-flow
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
#!/sbin/openrc-run
 | 
			
		||||
 | 
			
		||||
name=$RC_SVCNAME
 | 
			
		||||
description="OpenNebula Flow Service"
 | 
			
		||||
command="/usr/bin/ruby /usr/lib/one/oneflow/oneflow-server.rb"
 | 
			
		||||
command_user="oneadmin:cloud"
 | 
			
		||||
pidfile="/run/one/${RC_SVCNAME}.pid"
 | 
			
		||||
supervisor="supervise-daemon"
 | 
			
		||||
 | 
			
		||||
depend() {
 | 
			
		||||
        need opennebula
 | 
			
		||||
        after syslog networking netmount
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start() {
 | 
			
		||||
        ebegin "Starting $RC_SVCNAME"
 | 
			
		||||
        start-stop-daemon --background \
 | 
			
		||||
            --exec $command \
 | 
			
		||||
            --make-pidfile --pidfile $pidfile --user $command_user \
 | 
			
		||||
            --start
 | 
			
		||||
        eend $?
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
stop() {
 | 
			
		||||
        ebegin "Stopping $RC_SVCNAME"
 | 
			
		||||
        start-stop-daemon --stop \
 | 
			
		||||
            --exec $command \
 | 
			
		||||
            --pidfile $pidfile --user $command_user
 | 
			
		||||
        eend $?
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user