Details
-
Suggestion
-
Resolution: Fixed
-
Redhat Linux
Description
The jira Linux script in http://confluence.atlassian.com/display/JIRA/Starting+JIRA+Standalone+automatically+on+Linux contains errors.
Below my corrected version:
--------------
#!/bin/sh -e
- JIRA startup script
#chkconfig: 2345 80 05
#description: JIRA
- Define some variables
- Name of app ( JIRA, Confluence, etc )
APP=jira - Name of the user to run as
USER=jira - Location of application's bin directory
BASE=/opt/jira
export JAVA_HOME=/usr/java/default
case "$1" in
- Start command
start)
echo "Starting $APP"
/bin/su -m $USER -c "cd $BASE/logs && $BASE/bin/startup.sh &> $BASE/logs/daemon-start.log"
;; - Stop command
stop)
echo "Stopping $APP"
/bin/su -m $USER -c "$BASE/bin/shutdown.sh &> $BASE/logs/daemon-stop.log"
echo "$APP stopped successfully"
;; - Restart command
restart)
$0 stop
sleep 10
$0 start
;;
*)
echo "Usage: /etc/init.d/$APP {start|restart|stop}"
exit 1
;;
esac
exit 0
--------------