* some improvements of the initscript for debian

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5462 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
f1ori 16 years ago
parent 8632eebf60
commit 37e1cb139d

@ -85,7 +85,7 @@ ifdef(`Fedora', `dnl
[ -e /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME [ -e /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
')dnl ')dnl
if [ "$(id -u)" != "0" ] ; then if [ "$(id -u)" != "0" -a "$(whoami)" != "$USER" ] ; then
echo "please run this script as root!" echo "please run this script as root!"
exit 4 exit 4
fi fi
@ -126,16 +126,29 @@ for name in /usr/share/java/yacy/*.jar; do
CP=$CP:$name CP=$CP:$name
done done
ifdef(`Debian', ` ifdef(`Debian', `
#CP="$CP:/usr/share/java/javatar.jar" CP="$CP:/usr/share/java/javatar.jar"
#CP="$CP:/usr/share/java/commons-httpclient.jar" CP="$CP:/usr/share/java/commons-httpclient.jar"
#CP="$CP:/usr/share/java/commons-logging.jar" CP="$CP:/usr/share/java/commons-fileupload.jar"
#CP="$CP:/usr/share/java/commons-codec.jar" CP="$CP:/usr/share/java/commons-logging.jar"
#CP="$CP:/usr/share/java/commons-discovery.jar" CP="$CP:/usr/share/java/commons-codec.jar"
#CP="$CP:/usr/share/java/pdfbox.jar" CP="$CP:/usr/share/java/commons-discovery.jar"
#CP="$CP:/usr/share/java/jakarta-poi.jar" CP="$CP:/usr/share/java/commons-io.jar"
#CP="$CP:/usr/share/java/oro.jar" CP="$CP:/usr/share/java/pdfbox.jar"
#CP="$CP:/usr/share/java/xerces.jar" CP="$CP:/usr/share/java/bcprov.jar"
#CP="$CP:/usr/share/java/jsch.jar" CP="$CP:/usr/share/java/bcmail.jar"
CP="$CP:/usr/share/java/jakarta-poi.jar"
CP="$CP:/usr/share/java/jakarta-poi-scratchpad.jar"
CP="$CP:/usr/share/java/oro.jar"
CP="$CP:/usr/share/java/xerces.jar"
CP="$CP:/usr/share/java/jsch.jar"
CP="$CP:/usr/share/java/ant.jar" # bzip-stuff
CP="$CP:/usr/share/java/jmimemagic.jar"
CP="$CP:/usr/share/java/log4j-1.2.jar"
CP="$CP:/usr/share/java/odfutils.jar"
CP="$CP:/usr/share/java/jrpm.jar"
CP="$CP:/usr/share/java/tmextractors.jar"
CP="$CP:/usr/share/java/servlet-api.jar"
CP="$CP:/usr/share/java/j7zip.jar"
')dnl ')dnl
CLASSPATH=$CP CLASSPATH=$CP
@ -196,6 +209,7 @@ ifdef(`ArchLinux', `
stat_done stat_done
')dnl ')dnl
RETVAL=0 RETVAL=0
chown yacy:root $PID_FILE
else else
ifdef(`Debian', ` ifdef(`Debian', `
echo "failed." echo "failed."
@ -258,7 +272,9 @@ ifdef(`Debian', `KILL_YACY_WITH_START_STOP_DAEMON()')dnl
sleep 1 sleep 1
pidno=$( ps ax | grep $pid | awk '{ print $1 }' | grep $pid ) pidno=$( ps ax | grep $pid | awk '{ print $1 }' | grep $pid )
done done
rm $PID_FILE if [ "$2" != "--leave-pidfile" ]; then
rm $PID_FILE
fi
cd - >/dev/null cd - >/dev/null
ifdef(`Debian', ` ifdef(`Debian', `
echo "$NAME." echo "$NAME."
@ -279,13 +295,16 @@ ifdef(`ArchLinux', `
;; ;;
restart) restart)
$0 stop $0 stop --leave-pidfile
sleep 1 sleep 1
$0 start $0 start
;; ;;
reload) reload)
$0 restart $0 restart
;; ;;
force-reload)
$0 restart
;;
status) status)
# needed by Fedora # needed by Fedora
if [ -n "$pidno" ]; then if [ -n "$pidno" ]; then

Loading…
Cancel
Save