mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@235904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
		
			
				
	
	
		
			41 lines
		
	
	
		
			994 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			994 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| # asterisk
 | |
| #
 | |
| # Upstart control file for the Asterisk PBX
 | |
| #
 | |
| # To install, rename this file to 'asterisk' and copy it to /etc/event.d/
 | |
| # On Debian: copy to /etc/init/
 | |
| #
 | |
| # To start asterisk manually:
 | |
| #     sudo start asterisk
 | |
| #
 | |
| # To stop asterisk manually:
 | |
| #     sudo stop asterisk
 | |
| #
 | |
| # Asterisk is started with an "interactive console", though redirected
 | |
| # to/from /dev/null . The concept of a main console is bad. OTOH, the main
 | |
| # process should not detach from the console if we work with upstart and
 | |
| # alike.
 | |
| #
 | |
| # The username 'asterisk' is currently hardwired here, and likewise the
 | |
| # varrundir.
 | |
| #
 | |
| 
 | |
| description "Asterisk PBX"
 | |
| #version     "1.8"
 | |
| 
 | |
| start on runlevel [2345]
 | |
| stop  on runlevel [!2345]
 | |
| 
 | |
| pre-start script
 | |
|   # Since Ubuntu clears /var/run on reboot, create this before we try to start
 | |
|   if [ ! -d /var/run/asterisk ]; then
 | |
|     mkdir -p asterisk /var/run/asterisk
 | |
|     chown asterisk: /var/run/asterisk
 | |
|   fi
 | |
| end script
 | |
| 
 | |
| #console output
 | |
| respawn
 | |
| exec /usr/sbin/asterisk -U asterisk -g -f
 | |
| 
 |