+add makefile.start and makefile.stop checks if the environment is already started/stopped

This commit is contained in:
xdrm-brackets 2018-02-18 19:36:35 +01:00
parent 575cf402f8
commit 13f35eb71c
1 changed files with 3 additions and 0 deletions

View File

@ -1,4 +1,5 @@
start:
@test "`docker-compose ps | wc -l`" -le "2" || (echo -e "/!\\ already running environment\n"; exit 1);
@echo "> [1] pre-start script";
@bash ./metactl/pre-start.sh && echo "< done" || (echo "< failed"; exit 1);
@echo;
@ -9,6 +10,7 @@ start:
@bash ./metactl/post-start.sh && echo "< done" || (echo "< failed"; exit 1);
start-no-cache:
@test "`docker-compose ps | wc -l`" -le "2" || (echo -e "/!\\ already running environment\n"; exit 1);
@echo "> [1] pre-start script";
@bash ./metactl/pre-start.sh && echo "< done" || (echo "< failed"; exit 1);
@echo;
@ -19,6 +21,7 @@ start-no-cache:
@bash ./metactl/post-start.sh && echo "< done" || (echo "< failed"; exit 1);
stop:
@test "`docker-compose ps | wc -l`" -gt "2" || (echo -e "/!\\ no running environment\n"; exit 1);
@echo "> [1] pre-stop script";
@bash ./metactl/pre-stop.sh && echo "< done" || (echo "< failed"; exit 1);
@echo;