Skip to content

Instantly share code, notes, and snippets.

@claylo
Created June 1, 2011 17:44
Show Gist options
  • Save claylo/1002848 to your computer and use it in GitHub Desktop.
Save claylo/1002848 to your computer and use it in GitHub Desktop.
launchd wrapper for Atlassian JIRA on OS X
#!/bin/bash
function shutdown()
{
date
echo "Shutting down JIRA"
$JIRA_HOME/bin/stop-jira.sh
}
date
echo "Starting JIRA"
export JIRA_PID=/tmp/$$
# Uncomment to increase Tomcat's maximum heap allocation
# export JAVA_OPTS=-Xmx512M $JAVA_OPTS
. $JIRA_HOME/bin/start-jira.sh
# Allow any signal that would kill a process to stop Tomcat
trap shutdown HUP INT QUIT ABRT KILL ALRM TERM TSTP
echo "Waiting for `cat $JIRA_PID`"
wait `cat $JIRA_PID`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment