Created
March 4, 2019 16:16
-
-
Save denchistyakov/d192177c62880d124b0842cbfb779736 to your computer and use it in GitHub Desktop.
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
case "$1" in | |
start) | |
echo "Starting TeamCity Agent '$teamcity_agent_name'..." | |
d_start $teamcity_agent_name | |
;; | |
stop) | |
echo "Stopping TeamCity Agent '$teamcity_agent_name'..." | |
d_stop $teamcity_agent_name | |
;; | |
restart|force-reload) | |
echo "Restarting TeamCity Agent '$teamcity_agent_name'..." | |
d_stop $teamcity_agent_name | |
sleep 1 | |
d_start $teamcity_agent_name | |
;; | |
status) | |
d_status $teamcity_agent_name | |
;; | |
list) | |
find $AGENTS_ROOT -maxdepth 1 -mindepth 1 -type d -printf '%f\n' | sort | |
;; | |
install) | |
echo "Installing new agent $teamcity_agent_name connected to $3" | |
d_install $teamcity_agent_name $3 $4 | |
;; | |
*) | |
echo "Usage: /etc/init.d/teamcity-agent {start|stop|restart|status|install} [<teamcity-agent-name>] [<teamcity.server.url>] [<user>]" >&2 | |
exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment