Created
July 21, 2018 12:08
-
-
Save garywoodfine/9765bfc383a86c2fce732ed512048729 to your computer and use it in GitHub Desktop.
TeamCity autostart
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 | |
### BEGIN INIT INFO | |
# Provides: TeamCity autostart | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start teamcity daemon at boot time | |
# Description: Enable service provided by daemon. | |
# /etc/init.d/teamcity - startup script for teamcity | |
### END INIT INFO | |
# Ensure you enter the right user name that TeamCity will run under | |
USER="agentuser" | |
export TEAMCITY_DATA_PATH="/opt/JetBrains/TeamCity/.BuildServer" | |
case $1 in | |
start) | |
start-stop-daemon --start -c $USER --exec /opt/JetBrains/TeamCity/bin/runAll.sh start | |
;; | |
stop) | |
start-stop-daemon --start -c $USER --exec /opt/JetBrains/TeamCity/bin/runAll.sh stop | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment