ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] Kill в загрузочных скриптах SysV
@ 2005-06-01 19:45 Jury Levykin
  0 siblings, 0 replies; only message in thread
From: Jury Levykin @ 2005-06-01 19:45 UTC (permalink / raw)
  To: community

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

ALM 2.4
я заметил, что созданный мной скрипт (высылаю его во вложенном файле).
не выполняется на втором уровне загрузки, хотя ссылка
-----------------------------------------
$ ls -l /etc/rc.d/rc2.d/K15tomcat
lrwxrwxrwx  1 root root 16 Июн  1 23:22 /etc/rc.d/rc2.d/K15tomcat -> 
../init.d/tomcat
-----------------------------------------
есть и chkconfig c этим скриптом работает.

но при выполнении
# init 2
также как и на других уровнях загрузки где стоит Kill скрипт не 
останавливает tomcat.
На экран не выводится сообщение и tomcat остается запущенным.

В чем может быть проблема?
Как выключить демона перед выключением компьютера?

[-- Attachment #2: tomcat --]
[-- Type: text/plain, Size: 3029 bytes --]

#!/bin/sh
#
# tomcat          Start/Stop the Jakarta Tomcat
#
# chkconfig: 345 87 15
# description: Tomcat is the servlet container that is used \
#   in the official Reference Implementation for the Java Servlet \
#   and JavaServer Pages technologies. The Java Servlet and JavaServer Pages \
#   specifications are developed by Sun under the Java Community Process.
#
# processname: jsvc
# pidfile: /var/run/jsvc.pid
# config: /usr/local/tomcat/5.5/conf/server.xml
#
##############################################################################
#
#   Copyright 2004 The Apache Software Foundation.
#
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.
##############################################################################
#
# Small shell script to show how to start/stop Tomcat using jsvc
# If you want to have Tomcat running on port 80 please modify the server.xml
# file:
#
#    <!-- Define a non-SSL HTTP/1.1 Connector on port 80 -->
#    <Connector className="org.apache.catalina.connector.http.HttpConnector"
#               port="80" minProcessors="5" maxProcessors="75"
#               enableLookups="true" redirectPort="8443"
#               acceptCount="10" debug="0" connectionTimeout="60000"/>
#
# That is for Tomcat-5.0.x (Apache Tomcat/5.0)
#
# Adapt the following lines to your configuration
JAVA_HOME=/usr/java/jdk1.5.0_02
CATALINA_HOME=/usr/local/tomcat/5.5
DAEMON_HOME=/usr/local/tomcat/5.5/bin
TOMCAT_USER=tomcat5
TMP_DIR=/var/tmp
CATALINA_OPTS=
CLASSPATH=\
$JAVA_HOME/lib/tools.jar:\
$CATALINA_HOME/bin/commons-daemon.jar:\
$CATALINA_HOME/bin/bootstrap.jar

case "$1" in
  start)
    #
    # Start Tomcat
    #
	echo -n "Tomcat starting ... "
	chown -R tomcat5:tomcat5 /usr/local/tomcat/5.5/*
    $DAEMON_HOME/jsvc \
    -user $TOMCAT_USER \
    -home $JAVA_HOME \
    -Dcatalina.home=$CATALINA_HOME \
    -Djava.io.tmpdir=$TMP_DIR \
    -outfile $CATALINA_HOME/logs/catalina.out \
    -errfile '&1' \
    $CATALINA_OPTS \
    -cp $CLASSPATH \
    org.apache.catalina.startup.Bootstrap
    #
    # To get a verbose JVM
    #-verbose \
    # To get a debug of jsvc.
    #-debug \
    ;;

  stop)
    #
    # Stop Tomcat
    #
	echo -n "Tomcat shutting ... "
	PID=`cat /var/run/jsvc.pid`
    kill $PID
    ;;

  status)
	echo "Tomcat processes: "
	ps aux --cols 1024 | grep org.apache.catalina.startup.Bootstrap | grep -v grep
	;;

  restart|reload)
	$0 stop
	$0 start
	exit 0
	;;

  *)
	echo "Usage: $0 {start|stop|status|restart|reload}"
    exit 1
	;;

esac

echo "    [ DONE ]"

exit 0

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-06-01 19:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-01 19:45 [Comm] Kill в загрузочных скриптах SysV Jury Levykin

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git