Clean up upstart files
This commit is contained in:
parent
e0e78b1349
commit
85e8088e40
2 changed files with 71 additions and 87 deletions
30
src/dist/extras/upstart/helma
vendored
30
src/dist/extras/upstart/helma
vendored
|
@ -6,6 +6,15 @@
|
|||
# andreas bolka, 2003-11-30
|
||||
#
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: helma
|
||||
# Required-Start: postgresql apache2
|
||||
# Required-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-STop: 0 1 6
|
||||
# Short-Description: Helma Application Server
|
||||
### END INIT INFO
|
||||
|
||||
HELMA_CONFIG=/etc/helma.conf
|
||||
|
||||
###
|
||||
|
@ -19,25 +28,27 @@ else
|
|||
fi
|
||||
|
||||
# Check for missing files and directories
|
||||
|
||||
if [ ! -x $JAVA_BIN ]; then
|
||||
echo "Config error: JAVA_BIN $JAVA_BIN not found or not executable"
|
||||
exit 5
|
||||
fi
|
||||
|
||||
if [ ! -r $HELMA_INSTALL/launcher.jar ]; then
|
||||
echo "Config error: $HELMA_INSTALL/launcher.jar not found or not readable"
|
||||
exit 5
|
||||
fi
|
||||
|
||||
if [ ! -d $HELMA_HOME ]; then
|
||||
echo "Config error: HELMA_HOME $HELMA_HOME not found"
|
||||
exit 5
|
||||
fi
|
||||
|
||||
# local settins
|
||||
RUN_CMD="sudo -u $HELMA_USER $JAVA_BIN"
|
||||
RUN_ARGS="$JAVA_OPTS -jar $HELMA_INSTALL/launcher.jar -h $HELMA_HOME $HELMA_ARGS"
|
||||
RUN_CMD="su - $HELMA_USER"
|
||||
RUN_ARGS="-c $JAVA_BIN $JAVA_OPTS -jar $HELMA_INSTALL/launcher.jar -h $HELMA_HOME $HELMA_ARGS"
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start)
|
||||
echo -n "Starting $HELMA_SERVICE: "
|
||||
|
||||
if [ -f $HELMA_PID ]; then
|
||||
|
@ -46,12 +57,12 @@ start)
|
|||
fi
|
||||
|
||||
cd $HELMA_HOME
|
||||
nohup $RUN_CMD $RUN_ARGS > $HELMA_LOG 2>&1 &
|
||||
nohup $RUN_CMD "$RUN_ARGS" > $HELMA_LOG 2>&1 &
|
||||
echo $! > $HELMA_PID
|
||||
echo "$HELMA_SERVICE (pid `cat $HELMA_PID`) started."
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop)
|
||||
echo -n "Shutting down $HELMA_SERVICE: "
|
||||
if [ ! -f $HELMA_PID ]; then
|
||||
echo "$HELMA_SERVICE not running"
|
||||
|
@ -65,20 +76,21 @@ stop)
|
|||
echo "stopped."
|
||||
;;
|
||||
|
||||
restart)
|
||||
restart)
|
||||
$0 stop && $0 start
|
||||
;;
|
||||
|
||||
reload)
|
||||
reload)
|
||||
echo -n "Reloading $HELMA_SERVICE: $HELMA_SERVICE"
|
||||
touch $HELMA_HOME/server.properties
|
||||
touch $HELMA_HOME/apps.properties
|
||||
echo "."
|
||||
;;
|
||||
|
||||
*)
|
||||
*)
|
||||
echo "Usage: /etc/init.d/helma start|stop|restart|reload"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
|
92
src/dist/extras/upstart/helma.conf
vendored
92
src/dist/extras/upstart/helma.conf
vendored
|
@ -1,72 +1,44 @@
|
|||
##############################################################
|
||||
###
|
||||
### Helma object publisher config file
|
||||
### Author: Hannes Wallnoefer, <hannes@helma.at>
|
||||
### Author: Andreas Bolka
|
||||
###
|
||||
### This file should be placed in /etc/helma.conf.
|
||||
### It is read by the Helma service control script,
|
||||
### usually /etc/init.d/helma.
|
||||
###
|
||||
##############################################################
|
||||
#
|
||||
# Helma Object Publisher configuration file
|
||||
#
|
||||
# Authors:
|
||||
# Hannes Wallnoefer <hannes@helma.at>,
|
||||
# Andreas Bolka
|
||||
#
|
||||
# This file should be placed in /etc/helma.conf.
|
||||
# It is read by the Helma service control script,
|
||||
# usually /etc/init.d/helma.
|
||||
#
|
||||
|
||||
##############################################################
|
||||
### The name of this Helma server/service and the
|
||||
### pid file to be used
|
||||
#############################################################
|
||||
# Full path to Java executable
|
||||
JAVA_HOME=/usr/lib/jvm/default-java
|
||||
JAVA_BIN=$JAVA_HOME/bin/java
|
||||
|
||||
# Options passed to the Java runtime
|
||||
JAVA_OPTS="-server -Djava.awt.headless=true -Dfile.encoding=utf-8 -Djsse.enableSNIExtension=false"
|
||||
|
||||
# The name of this Helma server/service and the pid file to be used
|
||||
HELMA_SERVICE=helma
|
||||
HELMA_PID=/var/run/helma.pid
|
||||
|
||||
# Helma install directory. This is where we look for the Helma jar files
|
||||
# (launcher.jar, lib/* and lib/ext/*)
|
||||
HELMA_INSTALL=/home/helma
|
||||
|
||||
##############################################################
|
||||
### Full path to Java executable
|
||||
##############################################################
|
||||
JAVA_HOME=/usr/lib/j2sdk1.5-sun
|
||||
JAVA_BIN=$JAVA_HOME/bin/java
|
||||
|
||||
|
||||
##############################################################
|
||||
### Options passed to the Java runtime
|
||||
##############################################################
|
||||
JAVA_OPTS="-Djava.awt.headless=true"
|
||||
|
||||
|
||||
##############################################################
|
||||
### Helma install directory. This is where we look for
|
||||
### the Helma jar files (launcher.jar, lib/* and lib/ext/*)
|
||||
##############################################################
|
||||
HELMA_INSTALL=/usr/local/helma/helma-1.6.x
|
||||
|
||||
|
||||
##############################################################
|
||||
### Helma home directory, in case it is different from the
|
||||
### Helma install dir. This is where Helma will look for
|
||||
### properties files and applications.
|
||||
##############################################################
|
||||
# Helma home directory, in case it is different from the Helma install dir.
|
||||
# This is where Helma will look for properties files and applications.
|
||||
HELMA_HOME=$HELMA_INSTALL
|
||||
|
||||
|
||||
##############################################################
|
||||
### The user Helma should be running as
|
||||
##############################################################
|
||||
# The user Helma should be running as
|
||||
HELMA_USER=helma
|
||||
|
||||
|
||||
##############################################################
|
||||
### File to which standard and error output from Helma
|
||||
### is redirected
|
||||
##############################################################
|
||||
# File to which standard and error output from Helma is redirected
|
||||
HELMA_LOG=$HELMA_HOME/log/helma-out.log
|
||||
|
||||
|
||||
##############################################################
|
||||
### Helma options. Possible options are:
|
||||
###
|
||||
### -f file Specify server.properties file
|
||||
### -p port Specify RMI port number
|
||||
### -w port Specify port number for embedded Web server
|
||||
### -x port Specify XML-RPC port number
|
||||
### -jk port Specify AJP13 port number
|
||||
###
|
||||
##############################################################
|
||||
# Helma options. Possible options are:
|
||||
# -f file - Location of server.properties file
|
||||
# -p port - RMI port
|
||||
# -w port - Web server port
|
||||
# -x port - XML-RPC port
|
||||
# -jk port - AJP13 port
|
||||
HELMA_ARGS="-w 8080"
|
||||
|
|
Loading…
Add table
Reference in a new issue