Skip to content

Instantly share code, notes, and snippets.

@unRARed
Created December 19, 2016 22:03
Show Gist options
  • Select an option

  • Save unRARed/4bbe662159e6bb6b2a08a058dc249a93 to your computer and use it in GitHub Desktop.

Select an option

Save unRARed/4bbe662159e6bb6b2a08a058dc249a93 to your computer and use it in GitHub Desktop.
Modified Bamboo Startup script for Debian/Ubuntu
#!/bin/sh
# For Atlassian Bamboo version 5.14.3.1+
# The script here was out of date:
# https://confluence.atlassian.com/bamboo/running-bamboo-as-a-linux-service-416056046.html
set -e
### BEGIN INIT INFO
# Provides: bamboo
# 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 Bamboo Server
### END INIT INFO
# INIT Script
######################################
# Define some variables
# Name of app ( bamboo, Confluence, etc )
APP=bamboo
# Name of the user to run as
USER=bamboo
# Location of application's bin directory
BASE=/opt/atlassian/bamboo/bin
case "$1" in
# Start command
start)
echo "Starting $APP"
/bin/su - $USER -c "export BAMBOO_HOME=${BAMBOO_HOME}; $BASE/start-bamboo.sh &> /dev/null"
;;
# Stop command
stop)
echo "Stopping $APP"
/bin/su - $USER -c "$BASE/bin/stop-bamboo.sh &> /dev/null"
echo "$APP stopped successfully"
;;
# Restart command
restart)
$0 stop
sleep 5
$0 start
;;
*)
echo "Usage: /etc/init.d/$APP {start|restart|stop}"
exit 1
;;
esac
exit 0
@compadrejunior
Copy link
Copy Markdown

Awesome. I've been looking for several procedures to start Bamboo at AWS Linux startup but none of them worked. This one really worked for me. Than you.

@unRARed
Copy link
Copy Markdown
Author

unRARed commented May 18, 2020

Glad to hear it helped you! 4 years flew by, wow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment