From: Luc Santeramo (no email)
Date: Thu Mar 27 2003 - 10:36:21 EST
Hi,
I use the following scripts (on woody 3.0r1 box)
I know it is not optimized but it works like that, and I didn't have more
time to work on it.
if you have some good ideas, please tell me :)
::::::::::::::
/etc/init.d/aspseek_index
::::::::::::::
#!/bin/sh
#
# /etc/init.d/aspseek_index: start or stop aspseek indexer.
#
USER=aspseek
GROUP=aspseek
PREFIX=/usr/local/aspseek
HOME=$PREFIX/sbin
case "$1" in
start)
echo "Starting Aspseek Indexer"
#start-stop-daemon --start --quiet \
start-stop-daemon --start --quiet \
--chuid $USER:$GROUP --exec $PREFIX/sbin/start_index
echo "."
;;
stop)
echo "Shutting down Aspseek Indexer"
start-stop-daemon --start --quiet \
--chuid $USER:$GROUP --exec $PREFIX/sbin/stop_index
echo "."
;;
*)
echo "Usage: /etc/init.d/aspseek_index {start|stop}"
exit 1
;;
esac
exit 0
::::::::::::::
/etc/init.d/aspseek_searchd
::::::::::::::
#!/bin/sh
#
# /etc/init.d/aspseek_searchd: start or stop aspseek search daemon.
#
USER=aspseek
GROUP=aspseek
PREFIX=/usr/local/aspseek
case "$1" in
start)
echo "Starting Aspseek Search daemon"
start-stop-daemon --start --quiet \
--chuid $USER:$GROUP --exec $PREFIX/sbin/start_searchd
echo "."
;;
stop)
echo "Shutting down Aspseek Search daemon"
start-stop-daemon --start --quiet \
--chuid $USER:$GROUP --exec $PREFIX/sbin/stop_searchd
echo "."
;;
*)
echo "Usage: /etc/init.d/aspseek_searchd {start|stop}"
exit 1
;;
esac
exit 0
::::::::::::::
/usr/local/aspseek/sbin/start_index
::::::::::::::
#!/bin/bash
# adresse email de l'administrateur
EMAIL=
echo "Demarrage de l'indexation"
nohup /usr/local/aspseek/sbin/index -N15 -R8 -m -r
/usr/local/aspseek/var/index.log &
echo "log dans /usr/local/aspseek/var/index.log"
echo "" | mail $EMAIL -s "Indexation aspseek lancee"
::::::::::::::
/usr/local/aspseek/sbin/stop_index
::::::::::::::
#!/bin/bash
/usr/local/aspseek/sbin/index -E
::::::::::::::
/usr/local/aspseek/sbin/start_searchd
::::::::::::::
#!/bin/bash
# suppression des anciens processus s'ils tournent encore
ps aux | grep [s]earchd
if [ $? -eq 0 ]
then
killall searchd
fi
# lancement du demon
/usr/local/aspseek/sbin/searchd -D -R
::::::::::::::
/usr/local/aspseek/sbin/stop_searchd
::::::::::::::
#!/bin/bash
killall searchd
Luc
A 09:22 27/03/2003 -0500, KEVIN ZEMBOWER a écrit :
>Has anyone worked up a version of the startup script which will work on
>the Debian distro? I hate reinventing wheels. This is the script which
>would go in /etc/init.d. The one distributed with aspseek seems to be for
>RedHat, I think. It uses 'start-stop-daemon' which is missing from a
>Debian system.
>
>I searched the forum on 'startup' or 'init.d' but didn't turn up any
>promising leads. [I also posted this question there, before reading that
>it was just a shadow of this list. After I dope-slapped myself, I'm
>posting this here. Hope it doesn't get duplicated.] Debian stable doesn't
>seem to know about aspseek.
>
>If no one answers, I'll go ahead and start work on one. I'll post it here
>when I get it working.
>
>Thanks for your help.
>
>-Kevin Zembower
>
>-----
>E. Kevin Zembower
>Unix Administrator
>Johns Hopkins University/Center for Communications Programs
>111 Market Place, Suite 310
>Baltimore, MD 21202
>410-659-6139
|
|
|