LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   debian lennywon't startup koha daemons at boot (https://www.linuxquestions.org/questions/linux-newbie-8/debian-lennywont-startup-koha-daemons-at-boot-761219/)

MartyJay 10-11-2009 04:07 PM

debian lennywon't startup koha daemons at boot
 
I have installed Koha on Debian Lenny.
It does work well, but I have to manually start the koha-zebra-ctl.sh by entering /usr/share/koha/bin/koha-zebra-ctl.sh start

The idea is, however, that this starts at boot from /etc/init.d/koha-zebra-daemon.
Like /etc/init.d/koha-zebra-daemon start (does not work now)

In the koha-zebra-daemon file I have:

#!/bin/sh

# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh
set -e

# Must be a valid filename
NAME=koha-zebra-daemon
PIDFILE=/var/run/$NAME.pid
#This is the command to be run, give the full pathname
DAEMON=/usr/share/koha/bin/koha-zebra-ctl.sh
DAEMON_OPTS="--baz=quux"

export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"

case "$1" in
start)
echo -n "Starting daemon: "$NAME
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
echo "."
;;
stop)
echo -n "Stopping daemon: "$NAME
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
echo "."
;;
restart)
echo -n "Restarting daemon: "$NAME
start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile $PIDFILE
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
echo "."
;;

*)
echo "Usage: "$1" {start|stop|restart}"
exit 1
esac

exit 0

I have made a symbolic link;
ln -s /usr/share/koha/bin/koha-zebra-ctl.sh /etc/init.d/koha-zebra-daemon

I have tried checking whether the symbolic link exists with readlink, but this never seems to return anything anywhere.

Frankly, I am really puzzled. I have run out of ideas. Any help is welcome,

Marty

lutusp 10-11-2009 06:37 PM

Quote:

Originally Posted by MartyJay (Post 3715750)
I have installed Koha on Debian Lenny.
It does work well, but I have to manually start the koha-zebra-ctl.sh by entering /usr/share/koha/bin/koha-zebra-ctl.sh start

The idea is, however, that this starts at boot from /etc/init.d/koha-zebra-daemon.

[ snip ]

Frankly, I am really puzzled. I have run out of ideas. Any help is welcome,

Marty

To make a service start automatically:

Code:

# chkconfig (service name) on
This can also be done using various GUI utilities that vary from distribution to distribution.

MartyJay 10-11-2009 07:11 PM

I just wish it were that simple. For some reason Debian requires you to be a magician to startup a daemon at boot. But thanks, I'll try again.

Quote:

Originally Posted by lutusp (Post 3715850)
To make a service start automatically:

Code:

# chkconfig (service name) on
This can also be done using various GUI utilities that vary from distribution to distribution.


MartyJay 10-11-2009 07:12 PM

If it were only that simple. Debain requires you to be a magician to get a daemon started at boot. But thanks, I'll try again.

lutusp 10-11-2009 08:06 PM

Quote:

Originally Posted by MartyJay (Post 3715892)
If it were only that simple. Debain requires you to be a magician to get a daemon started at boot. But thanks, I'll try again.

Please .. say what happened. Did you run my suggestion as root? What happened?

MartyJay 10-11-2009 08:42 PM

Sorry for not giving more info, yes I did try, it does not do anything.

debian:/etc/init.d# chkconfig koha-zebra-daemon on
debian:etc/init.d#

It definitely does not start the zebra server. I am thinking something's wrong in my /etc/init.d/koha-zebra-daemon file, but I have been wrong before...


All times are GMT -5. The time now is 09:34 PM.