Skip to content

Instantly share code, notes, and snippets.

@grigory-rechistov
Created October 10, 2015 12:01
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 grigory-rechistov/2a365099ca6ed93e8a42 to your computer and use it in GitHub Desktop.
Save grigory-rechistov/2a365099ca6ed93e8a42 to your computer and use it in GitHub Desktop.
TeamCity init.d start/stop script for Debian based on http://www.eknori.de/2015-06-11/teamcity-startstop-script-for-linux/
#!/bin/sh
# /etc/init.d/teamcity # startup script for TeamCity
### BEGIN INIT INFO
# Provides: teamcity
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: TeamCity CI
### END INIT INFO
set -e
export TEAMCITY_DATA_PATH=/home/teamcity/BuildServer
export TEAMCITY_SERVER_OPTS=-Djava.awt.headless=true # Configure TeamCity for use on a headless OS.
case $1 in
start)
start-stop-daemon --start -c teamcity --exec /home/teamcity/TeamCity-9.1.3/TeamCity/bin/runAll.sh start
;;
stop)
start-stop-daemon --start -c teamcity --exec /home/teamcity/TeamCity-9.1.3/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