Added init.d and systemd service files.
This commit is contained in:
		
							parent
							
								
									d519a8f6a0
								
							
						
					
					
						commit
						0b3dc1f3ba
					
				
					 2 changed files with 58 additions and 0 deletions
				
			
		
							
								
								
									
										46
									
								
								mistserver.init
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								mistserver.init
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,46 @@ | |||
| #! /bin/sh | ||||
| ### BEGIN INIT INFO | ||||
| # Provides:          mistserver | ||||
| # Required-Start:    $network | ||||
| # Default-Start:    2 3 4 5 | ||||
| # Default-Stop:      0 1 6 | ||||
| # Short-Description: MistServer service | ||||
| # Description:      MistServer - next generation multimedia server | ||||
| ### END INIT INFO | ||||
| 
 | ||||
| # | ||||
| # Function that starts the daemon/service | ||||
| # | ||||
| do_start() | ||||
| { | ||||
|   MistController -d -L /var/log/mistserver.log -c /etc/mistserver.conf | ||||
| } | ||||
| 
 | ||||
| # | ||||
| # Function that stops the daemon/service | ||||
| # | ||||
| do_stop() | ||||
| { | ||||
|   killall MistController | ||||
| } | ||||
| 
 | ||||
| case "$1" in | ||||
|   start) | ||||
|         echo "Starting MistServer" | ||||
|         do_start | ||||
|         ;; | ||||
|   stop) | ||||
|         echo "Stopping MistServer" | ||||
|         do_stop | ||||
|         ;; | ||||
|   restart) | ||||
|         log_daemon_msg "Restarting $DESC" "$NAME" | ||||
|         do_stop | ||||
|         sleep 2 | ||||
|         do_start | ||||
|         ;; | ||||
|   *) | ||||
|         echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2 | ||||
|         exit 3 | ||||
|         ;; | ||||
| esac | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Thulinma
						Thulinma