Setup Jira as a service on Debian-based systems

Although the Bamboo installation guide was very helpful setting up Bamboo on Ubuntu, the Jira auto-installer on Ubuntu was just missing a very tiny detail, which is setting the Jira service to auto start after a system reboot. I searched the community but couldn't find help.

I ended up learning a bit about System V and how to make a service script rc compatible: See here: http://manpages.ubuntu.com/manpages/xenial/en/man8/insserv.8.html

Then I modified the file /etc/init.d/jira to be like the following:

#!/bin/sh
set -e
### BEGIN INIT INFO
# Provides: jira
# Required-Start: $local_fs $remote_fs $network $time
# Required-Stop: $local_fs $remote_fs $network $time
# Should-Start: $syslog
# Should-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Atlassian Jira Server
### END INIT INFO
# INIT Script
######################################

# JIRA Linux service controller script
cd "/opt/atlassian/jira/bin"

case "$1" in
start)
./start-jira.sh
;;
stop)
./stop-jira.sh
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac

 

Then I ran:

sudo update-rc.d jira enable

 

I thought I'd share that in case somebody else has the same issue.

 

Cheers

0 comments

Comment

Log in or Sign up to comment
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

199 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you