Skip to content

Instantly share code, notes, and snippets.

@mattfinlayson
Created July 14, 2015 18:36
Show Gist options
  • Save mattfinlayson/92ab28f7c41974411dfb to your computer and use it in GitHub Desktop.
Save mattfinlayson/92ab28f7c41974411dfb to your computer and use it in GitHub Desktop.
include classpath("application.conf")
application.code="1234567890"
orient.baasbox.path="/opt/baasbox/db/baasbox"
orient.baasbox.backup.path="/opt/baasbox/db/backup"
push.baasbox.certificates.folder="/opt/baasbox/certificates"
#!/bin/bash
scriptdir="/opt/baasbox"
classpath="$scriptdir/lib/*"
# check if the RUNNING_PID file exists. In this case it will be deleted if there is no process with the same PID stored in it
# RUNNING_PID file is created by BaasBox when it starts. If it quits unexpectedly (kill -9, server crash) the file is not deleted and BaasBox will not restarts
if [ -f RUNNING_PID ];
then
ps -p $(cat RUNNING_PID) > /dev/null; test $? -eq 1 && rm RUNNING_PID
fi
exec java ${1+"$@"} -Dconfig.file=baasbox.config -cp "$classpath" play.core.server.NettyServer $scriptdir
[program:baasbox]
command=/opt/baasbox/start
user=baasbox
autostart=true
autorestart=true
stderr_logfile=/var/log/baasbox/baasbox.err.log
stdout_logfile=/var/log/baasbox/baasbox.out.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment