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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

56 views 0 5
Read article

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