Changes

Jump to navigation Jump to search
966 bytes added ,  02:09, 7 December 2014
Line 942: Line 942:     
  sv t /service/httpd-e-smith
 
  sv t /service/httpd-e-smith
 +
 +
===chkconfig and runlevel information===
 +
[http://linuxcommand.org/man_pages/chkconfig8.html chkconfig] provides a  simple  command-line  tool  for  maintaining  the /etc/rc[0-6].d  directory  hierarchy by relieving system administrators of the task of directly manipulating the  numerous  symbolic  links  in those directories.
 +
 +
You need to say to SME Server to add the script to each run level you have specified at the top of your init script( Default-Start: 2 3 4 5 and Default-Stop: 0 1 6 ). For Linux using rpm as centos or redhat, you can use
 +
 +
chkconfig YOUR_SERVICE_NAME --add
 +
 +
You can set the levels where the initscript has to start
 +
chkconfig YOUR_SERVICE_NAME --level 2345 on
 +
 +
If you want to see which runlevel your script will run in
 +
 +
chkconfig YOUR_SERVICE_NAME --list
 +
you can pipe the command
 +
chkconfig --list | egrep "nfs|rpc"
 +
 +
example :
 +
# chkconfig dhcp-dns --list
 +
dhcp-dns      0:arrêt 1:arrêt 2:marche 3:marche 4:marche 5:marche 6:arrêt
    
===allow a service to start for a particular time===
 
===allow a service to start for a particular time===

Navigation menu