Skip to content

Instantly share code, notes, and snippets.

@seuros
Created September 22, 2013 17:52
Show Gist options
  • Save seuros/6662227 to your computer and use it in GitHub Desktop.
Save seuros/6662227 to your computer and use it in GitHub Desktop.
##!/bin/bash
USER=teamcity
INSTALL=/home/$USER/BuildAgent
INSTANCE=1
# -------------
SCRIPT=$INSTALL/bin/agent.sh
case "$1" in
start|"")s
su -l $USER -c "$SCRIPT start"
;;
stop)
su -l $USER -c "$SCRIPT stop"
;;
*)
echo "Usage: teamcity-agent start|stop"
exit 3
esac
chmod +x /etc/init.d/teamcity-agent
update-rc.d teamcity-agent defaults
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment