Skip to content

Instantly share code, notes, and snippets.

@zcox
Last active December 20, 2015 20:59
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zcox/6193780 to your computer and use it in GitHub Desktop.
Save zcox/6193780 to your computer and use it in GitHub Desktop.
Titan Server 0.3.1 Upstart script for Ubuntu 12.04. Place the content below into /etc/init/titan.conf. Use `sudo start titan` to start the Titan server, and `sudo stop titan` to stop it. Titan will also auto-start if server is rebooted.
#http://upstart.ubuntu.com/cookbook/#introduction
author "Zach Cox <zcox@pongr.com>"
description "Titan+Cassandra+Rexster"
version "0.3.1"
#2=regular running mode, 3,4,5 are aliases for 2
start on runlevel [2345]
#0=shutdown, 1=single-user mode, 6=reboot
stop on runlevel [016]
#Logs to /var/log/upstart/titan.log
console log
#auto-restarts app if it dies unexpectedly, won't restart if it's stopped properly
respawn
env titan="bin/titan.sh"
env rexster_config="config/titan-server-rexster.xml"
env titan_config="config/titan-server-cassandra-es.properties"
#assume Titan Server extracted in to this dir
chdir /home/ubuntu/titan
exec $titan $rexster_config $titan_config
#by default, upstart will send the app SIGTERM on stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment