jira 的啓動主要依靠的是bin目錄下的catalina.sh腳本,提供瞭如init腳本的start,stop等參數
----------------------------------------------------------------------------------------------------------------
#!/bin/bash
#
# chkconfig: 2345 85 15
# description: jira
# processname: jirabash
# source function library
. /etc/init.d/functions
#下面一行比較重要,爲jira的安裝路徑,沒有的話,將會提示找不到文件spa
CATALINA_HOME="/var/www/jira"
rest
RETVAL=0blog
start() {
echo -n $"Starting jira services: "
. /var/www/jira/bin/catalina.sh startip
RETVAL=$?
echo
}it
stop() {
echo -n $"Shutting down jira services: "io
. /var/www/jira/bin/catalina.sh stopfunction
RETVAL=$?service
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
-------------------------------
保存爲/etc/init.d/jira
須要對jira 文件賦可執行權限 chmod +x /etc/init.d/jira
而後利用chkconfig --add jira 添加自啓動
chkconfig --list 查看
驗證是否生效:
reboot以後,jira正常啓動。