Difference between revisions of "Upstart for voipmonitor ubuntu 12.04"

From VoIPmonitor.org
Jump to navigation Jump to search
(Created page with "Upstart scripts are deprecated since version of ubuntu 15.04 (so this should be valid for 12.04 and possibly 14.04) Voipmonitor install script by default enables sysV init sc...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Upstart scripts are deprecated since version of ubuntu 15.04 (so this should be valid for 12.04 and possibly 14.04)
 
Upstart scripts are deprecated since version of ubuntu 15.04 (so this should be valid for 12.04 and possibly 14.04)
  
Voipmonitor install script by default enables sysV init scripts. But when you using upstart script for starting mysql, service in sysV are started before services in upstart, and thus voipmonitor start needs to be configured as statup script instead of init.d init script
+
Voipmonitor install script by default install sysV init script that is used to start stop service. But when you using upstart script for booting / starting mysql, service in sysV are started before services in upstart, and thus voipmonitor start needs to be configured as startup script instead of init.d init script.
  
#write upstart init script
+
'''write upstart init script'''
 
create a file /etc/init/voipmonitor.conf
 
create a file /etc/init/voipmonitor.conf
  
 
  exec /etc/init.d/voipmonitor start
 
  exec /etc/init.d/voipmonitor start
#expect fork
 
 
  expect fork
 
  expect fork
 
  start on started mysql
 
  start on started mysql
Line 17: Line 16:
 
  end script
 
  end script
  
#disable upstart with sysV, first check if its enabled
+
'''disable upstart with sysV, first check if its enabled'''
 
  chkconfig voipmonitor
 
  chkconfig voipmonitor
 
  update-rc.d -f voipmontior remove
 
  update-rc.d -f voipmontior remove
  
#you can control voipmonitor with commands:
+
'''you can control voipmonitor with commands'''
 
  service voipmonitor start|stop|restart
 
  service voipmonitor start|stop|restart

Latest revision as of 20:59, 1 November 2016

Upstart scripts are deprecated since version of ubuntu 15.04 (so this should be valid for 12.04 and possibly 14.04)

Voipmonitor install script by default install sysV init script that is used to start stop service. But when you using upstart script for booting / starting mysql, service in sysV are started before services in upstart, and thus voipmonitor start needs to be configured as startup script instead of init.d init script.

write upstart init script create a file /etc/init/voipmonitor.conf

exec /etc/init.d/voipmonitor start
expect fork
start on started mysql
pre-start script
  /etc/init.d/voipmonitor start
end script
post-stop script
  /etc/init.d/voipmonitor stop
end script

disable upstart with sysV, first check if its enabled

chkconfig voipmonitor
update-rc.d -f voipmontior remove

you can control voipmonitor with commands

service voipmonitor start|stop|restart