-
-
Save gravcat/cc90cdd01f059296c78e87130614d7d0 to your computer and use it in GitHub Desktop.
Init script for starting/stopping a bamboo agent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# bamboo-agent Init script for running bamboo agent | |
# | |
# chkconfig: 2345 98 02 | |
# | |
# description: Starts and stops bamboo agent | |
# This is just a delegator to the Bamboo agent script. | |
USER=bamboo | |
AGENT_HOME=/home/$USER/bamboo-agent-home/bin | |
if [[ "$EUID" != '0' ]]; then | |
echo 'This script must be run as root!' | |
exit 1 | |
fi | |
status=`su - $USER -c "$AGENT_HOME/bamboo-agent.sh $@ 1>&2 ;"' echo $?'` | |
exit $status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment