Centos – How to adapt this debian init.d script to work with CentOS 5

centoscentos5debianinit.d

I'm trying to get an lsyncd daemon running. I installed the lsyncd RPM from epel, but it doesn't seem to come with an init.d script. In the lsyncd repository, there's this script that works with Debian. However, when I try to run this under CentOS, I get this message:

/etc/init.d/lsyncd: line 46: log_daemon_msg: command not found

How can I adapt this to work with CentOS?

Best Answer

writing from scratch could be easier, depending on how complex the script is. the issue you're running into is this line in the script:

. /lib/lsb/init-functions

which loads all the functions for debian's startup scripts. in that is a function 'log_daemon_msg' which is where your problem is at.

you could look at the init-functions file to figure out what log_daemon_msg does, and replicate on CentOS, or you could step through the Debian script and see what is actually run (probably less than 5 lines of commands)

Related Topic