Skip to content

Instantly share code, notes, and snippets.

@keltanas
Created October 21, 2015 00:28
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 keltanas/acdb8dd6ae8b9efc3e94 to your computer and use it in GitHub Desktop.
Save keltanas/acdb8dd6ae8b9efc3e94 to your computer and use it in GitHub Desktop.
#!/bin/sh
# /etc/init.d/teamcity - startup script for teamcity
export TEAMCITY_DATA_PATH="/home/keltanas/.BuildServer"
#sudo -u keltanas
case $1 in
start)
echo "Starting Team City"
start-stop-daemon --start -c keltanas --exec /opt/TeamCity/bin/runAll.sh start
;;
stop)
echo "Stopping Team City"
start-stop-daemon --start -c keltanas --exec /opt/TeamCity/bin/runAll.sh stop
;;
restart)
echo "Restarting Team City"
start-stop-daemon --start -c keltanas --exec /opt/TeamCity/bin/runAll.sh stop
start-stop-daemon --start -c keltanas --exec /opt/TeamCity/bin/runAll.sh start
;;
*)
echo "Usage: /etc/init.d/teamcity {start|stop|restart}"
exit 1
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment