I'm trying to install LLink (
http://www.lundman.net/wiki/index.php/Llink) on Centos4 which makes use of the script below. I'm trying to get it running using these instructions
http://www.lundman.net/wiki/index.ph...x_installation
Code:
#!/bin/sh
### BEGIN INIT INFO
# Provides: llink
# Required-Start: $network $local_fs $remote_fs
# Required-Stop: $network $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start llink daemon
### END INIT INFO
# Defaults
RUN_MODE="daemons"
LLINKPID=/var/run/llink.pid
LLINK=/usr/local/bin/llink
LLINKOPTS="-f /usr/local/etc/llink/llink.conf -w /usr/local/etc/llink"
# clear conflicting settings from the environment
unset TMPDIR
# See if the daemons are there
test -x /usr/local/bin/llink || exit 0
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting llink daemons" "llink"
if ! start-stop-daemon --start --quiet --exec $LLINK -- $LLINKOPTS ; then
log_end_msg 1
exit 1
fi
log_end_msg 0
;;
stop)
log_daemon_msg "Stopping llink daemons" "llink"
start-stop-daemon --stop --quiet --oknodo --exec $LLINK -- $LLINKOPTS
;;
reload|restart|force-reload)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: /etc/init.d/llink {start|stop|reload|restart|force-reload}"
exit 1
;;
esac
exit 0
And needed to install the Debian start-stop-daemon on my Centos4 box. These are the steps I took to get it running on Centos:
I downloaded this tar archive:
http://developer.axis.com/download/d..._9_18-2.tar.gz
unpacked it
tar zxvf apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
cd apps/sys-utils/start-stop-daemon-IR1_9_18-2/
gcc start-stop-daemon.c -o start-stop-daemon
Then I copied the newly created start-stop-daemon binary to /usr/sbin/
The result is hopefull, but I'm still getting some errors. I'd like to work out the last errors and get this thing to start up at boot (well, not sure if that's such a big point since the server is running 24/7 but it's good fun getting there).
These are the errors I'm still stuck with:
Code:
[root@gateway]# /etc/init.d/llink start
/etc/init.d/llink: line 30: log_daemon_msg: command not found
/usr/local/bin/llink - Jorgen Lundman v2.2.0 lundman@shinken.interq.or.jp build 1305 (Mon Oct 27 12:30:29 2008) (libdvdnav).
[main] ready!
/etc/init.d/llink: line 33: -f: command not found
/etc/init.d/llink: line 38: log_end_msg: command not found
[root@gateway]#
Shame that all this is so Debian while all my boxes run Debian except for the server (Centos). Any clues on how to get this fixed? Perhaps I should't use this script at all and go for a more Centos solution. Any comments on that are very welcome!
Regards