# -*- makefile -*-

# This is a simple makefile which lives in a buildmaster/buildslave
# directory (next to the buildbot.tac file). It allows you to start/stop the
# master or slave by doing 'make start' or 'make stop'.

# The 'reconfig' target will tell a buildmaster to reload its config file.

ifeq  ($(USER),  buildbot) 
	CMD=
else
	CMD=sudo -H -u buildbot 
endif

start:
	${CMD} twistd --no_save -y buildbot.tac

stop:
	${CMD} kill `cat twistd.pid`

reconfig:
	${CMD} kill -HUP `cat twistd.pid`

log:
	tail -f twistd.log
