Linux set up since the start of the next jira

jira startup relies mainly on catalina.sh script in the bin directory, provides as start init script, stop parameters

#!/bin/bash
#
# chkconfig: 2345 85 15
# description: jira
# processname: jira
    
# source function library

. /etc/init.d/functions

#下面一行比较重要,为jira的安装路径,没有的话,将会提示找不到文件
#/opt/atlassian/jira为jira安装路径

CATALINA_HOME="/opt/atlassian/jira"

RETVAL=0

start() {
echo -n $"Starting jira services: "
 
. /opt/atlassian/jira/bin/catalina.sh start

RETVAL=$?
echo
}

stop() {
echo -n $"Shutting down jira services: "

. /opt/atlassian/jira/bin/catalina.sh stop

RETVAL=$?

echo
}

case "$1" in
  start)
 start
 ;;
  stop)
 stop
 ;;
  restart|reload)
 stop
 start
 ;;
  status)
 status jira
 RETVAL=$?
 ;;
  *)
 echo $"Usage: $0 {start|stop|restart|status}"
 exit 1
esac

exit $RETVAL

-------------------------------
saved as /etc/init.d/jira

Fu needs executable permissions chmod + x /etc/init.d/jira on jira file

Then use chkconfig --add jira added from the start

chkconfig --list View

Here Insert Picture Description

Verify that effect:

After reboot, jira normal start.
Reprint articles to summer anne of the https://www.cnblogs.com/anne32184/p/7027683.html

Guess you like

Origin blog.csdn.net/LWHuai/article/details/82854233