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 Join to comment
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,026 views 12 18
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot