1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
description "Backlink"

env USER=backlink
env GROUP=nogroup
env HOME=/home/backlink/web
env JAVA_OPTS="-Xms128M -Xmx512m -server -Dhttp.port=9001 -Dhttp.address=127.0.0.1 -Dconfig.file=/home/backlink/application.conf -Dlogger.file=/home/backlink/logger.xml"
env LOGFILE="/home/backlink/web/process-log"

start on runlevel [2345]
stop on runlevel [016]

# respawn
expect daemon

pre-start script
  rm -f ${HOME}/RUNNING_PID
end script

script
  ${HOME}/start $JAVA_OPTS > $LOGFILE 2>&1 &
end script