Targets for restarting daemon with a single make command.
authorTony Garnock-Jones <tonyg@lshift.net>
Fri Sep 26 11:10:20 2008 +0000 (2008-09-26)
changeset 151ff94633804c1
parent 150 7076a12df830
child 152 b69175e4af50
Targets for restarting daemon with a single make command.
Makefile
     1.1 --- a/Makefile	Fri Sep 26 11:09:47 2008 +0000
     1.2 +++ b/Makefile	Fri Sep 26 11:10:20 2008 +0000
     1.3 @@ -33,12 +33,25 @@
     1.4  
     1.5  stop:
     1.6  	erl_call -a 'jukebox stop_and_halt []' -sname jukebox
     1.7 +	@echo
     1.8 +	@while (ps wwwax | grep 'beam.*sname jukebox' | grep -q -v grep); do \
     1.9 +		echo 'Waiting for jukebox to exit...'; \
    1.10 +		sleep 1; \
    1.11 +	done
    1.12 +	@echo 'Jukebox has exited.'
    1.13 +
    1.14 +restart: stop daemon
    1.15 +
    1.16 +restart_clean: stop cleanstate daemon
    1.17  
    1.18  clean: cleanlog
    1.19  	rm -f $(TARGETS)
    1.20  	make -C priv/execdaemon clean
    1.21  	make -C $(IBROWSE_SOURCE_DIR) clean
    1.22  
    1.23 +cleanstate:
    1.24 +	rm -f ejukebox.state
    1.25 +
    1.26  cleanlog:
    1.27  	rm -f priv/server_root/logs/{access_log,error_log,security_log}
    1.28  	rm -f jukebox.log