Often I see functions inserted into a daemon shell script. For instance, consider the following two.
Code:
. /etc/rc.d/init.d/functions
Reference my 2.2 Apache script /etc/init.d/httpd
Code:
. /lib/lsb/init-functions
Reference
http://www.thegeekstuff.com/2012/03/lsbinit-script/
What are the difference between these two libraries(?) that are being inserted? How does one determine which should be used? I don't seem to have /lib/lsb/... on my Centos box. Am I missing something?
Also, within the shell script, how are these functions being used? For instance, within /etc/rc.d/init.d/functions, I see kilproc() {...}, and within /etc/init.d/httpd, I see the following two lines of code.
Code:
killproc -p ${pidfile} -d ${STOP_TIMEOUT} $httpd
LSB=1 killproc -p ${pidfile} $httpd -HUP
Thank you