view contrib/init.d/d4e-river @ 7597:fca46ce8e4f5

(issue1225) Implement Magic labels. There is now a new value in the chartsettings "Suggested Label" which is hidden in the property editor. A suggested label is the label that combines the label's of all processors that wrote data to an axis. This suggested label is set as the label when the user has not overwritten the label.
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 25 Nov 2013 14:58:14 +0100
parents bc4e1bf26227
children 1709c429818a
line wrap: on
line source
#!/bin/bash
#
### BEGIN INIT INFO
# Provides: d4e-server
# Required-Start: $network $syslog $remote_fs
# Should-Start: $named $syslog $time
# Required-Stop: $network $syslog
# Should-Stop: $named $syslog $time
# Default-Start:  3 5
# Default-Stop:   0 1 2 6
# Short-Description: Dive4Elements server
# Description:    Start Dive4Elements server
### END INIT INFO

RUNAS=flys
DIR="/opt/flys/current/server"

CLASSPATH=
for l in `find "$DIR/bin/lib" -name \*.jar -print`; do
    CLASSPATH=$CLASSPATH:$l
done


LOGFILE=/var/log/d4e-river.log
PIDFILE=/var/run/d4e-river.pid
ARGS="-Xmx256m \
     -server \
     -Djava.awt.headless=true \
     -Dflys.datacage.recommendations.development=false \
     -Djava.io.tmpdir=\"$DIR/cache\" \
     -Dflys.uesk.keep.artifactsdir=false \
     -Dwsplgen.bin.path=\"$DIR/bin/wsplgen.exe\" \
     -Dwsplgen.log.output=false \
     -Dartifact.database.dir=\"$DIR/conf\""
MAINCLASS=org.dive4elements.artifactdatabase.App

# For SELinux we need to use 'runuser' not 'su'
if [ -x "/sbin/runuser" ]; then
    SU="/sbin/runuser"
else
    SU="/bin/su"
fi

case "$1" in
  start)
    echo "Starting D4E-river server..."
    $SU - $RUNAS -c "/usr/bin/java -classpath $CLASSPATH $ARGS $MAINCLASS" &> $LOGFILE &
    PID=$!
    echo $PID > $PIDFILE
    ;;
  stop)
    echo "Stopping D4E-river server..."
    PID=`cat $PIDFILE`
    STOPRES=0
    while [ $STOPRES -le 0 ]
    do
      kill -15 $PID &> /dev/null
      STOPRES=$?
      sleep 1
    done
    echo "done."
    ;;
  restart)
    $0 stop && $0 start
    ;;
  *)
    echo "Usage: $0 [start|stop|restart]"
esac

http://dive4elements.wald.intevation.org