Run Bamboo as a service

sudo useradd --create-home -c "Bamboo role account" bamboo
sudo mkdir -p /opt/atlassian/bamboo
sudo chown bamboo: /opt/atlassian/bamboo

sudo su - bamboo

cd /opt/atlassian/bamboo
tar zxvf /tmp/atlassian-bamboo-X.Y.tar.gz
ln -s atlassian-bamboo-X.Y/ current

# Update home directory
vi current/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties 


# Create init.d service for CentOS 6
vi /etc/rc.d/init.d/bamboo

# Paste:

#!/bin/bash

# Bamboo Linux service controller script
unset CATALINA_HOME
cd "/opt/atlassian/bamboo/current/bin"

case "$1" in
    start)
        su -p --session-command=./start-bamboo.sh bamboo
        ;;
    stop)
        su -p --session-command=./stop-bamboo.sh bamboo
        ;;
    restart)
        su -p --session-command=./stop-bamboo.sh bamboo
        su -p --session-command=./start-bamboo.sh bamboo
        ;;
    *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
esac

# Add exec permission:
chmod +x /etc/rc.d/init.d/bamboo

# Start service
service bamboo start