- 
      
- 
        Save avsej/334322 to your computer and use it in GitHub Desktop. 
    Init script for jira
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/sh -e | |
| # chkconfig: 345 20 80 | |
| # description: Atlassian JIRA | |
| # init script for jira | |
| # /etc/init.d/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 | |
| BIN=/opt/jira/bin | |
| # Location of Java JDK | |
| export JAVA_HOME="/etc/alternatives/jre_1.6.0" | |
| case "$1" in | |
| # Start command | |
| start) | |
| echo "Starting $APP" | |
| /bin/su -m $USER -c "$BIN/startup.sh &> /dev/null" | |
| ;; | |
| # Stop command | |
| stop) | |
| echo "Stopping $APP" | |
| /bin/su -m $USER -c "$BIN/shutdown.sh &> /dev/null" | |
| echo "$APP stopped successfully" | |
| ;; | |
| *) | |
| echo "Usage: /etc/init.d/jira {start|stop}" | |
| exit 1 | |
| ;; | |
| esac | |
| exit 0 | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment