Skip to content

Instantly share code, notes, and snippets.

@garywoodfine
Created July 21, 2018 12:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garywoodfine/9765bfc383a86c2fce732ed512048729 to your computer and use it in GitHub Desktop.
Save garywoodfine/9765bfc383a86c2fce732ed512048729 to your computer and use it in GitHub Desktop.
TeamCity autostart
#!/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