Last active
October 26, 2016 17:32
-
-
Save Cryptophobia/aa9533a4ef970e62a2e63b5dd6986a52 to your computer and use it in GitHub Desktop.
/etc/init.d/teamcity
This file contains 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/sh | |
# /etc/init.d/teamcity | |
# Common parameters, do not edit: | |
PATH=/sbin:/usr/sbin:/bin:/usr/bin | |
DESC="TeamCity Agent" | |
NAME=teamcity-agent | |
SCRIPTNAME=/etc/init.d/$NAME | |
# | |
# User specific parameters: | |
USERNAME=ubuntu | |
GROUP=rvm | |
AGENT_HOME=~$USERNAME/buildAgent | |
# | |
# Carry out specific functions when asked to by the system | |
case "$1" in | |
start) | |
echo "Starting script teamcity " | |
sudo -H -u ubuntu /bin/bash --login -c "/home/ubuntu/buildAgent/bin/agent.sh start" | |
#/home/ubuntu/buildAgent/bin/agent.sh start | |
;; | |
stop) | |
echo "Stopping script teamcity" | |
sudo -H -u ubuntu /bin/bash --login -c "/home/ubuntu/buildAgent/bin/agent.sh stop" | |
#/home/ubuntu/buildAgent/bin/agent.sh stop | |
;; | |
*) | |
echo "Usage: /etc/init.d/teamcity {start|stop}" | |
exit 1 | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment