Startup and Shutdown JIRA automatically on OS X

listed in answer

Startup and Shutdown JIRA automatically on OS X
0 votes, 0.00 avg. rating (0% score)

ANSWER:

You’ll probably want to run it through launchctl: https://developer.apple.com/library/mac/#documentation/darwin/reference/manpages/man1/launchctl.1.html

You could write a simple script and have it launch on start $HOME/.launchd.conf

Here’s some documentation from JIRA: http://confluence.atlassian.com/display/JIRA044/Configure+JIRA+as+service+on+Mac+OS+X

And here’s an example script:

#!/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

by Ranman from http://serverfault.com/questions/380473