Carlos Aguni

Highly motivated self-taught IT analyst. Always learning and ready to explore new skills. An eternal apprentice.


Services eng Makefile screen

07 Feb 2021 »


svc=crash-myad

stop:
	taskid=$$(screen -ls | awk '{print $$1}' | grep "$(svc)")
	if [ ! "$${taskid}" == "" ]; then
		screen -x $${taskid} -X quit
	fi
       
start:
	screen -dmS $(svc) bash -c "python3 app.py"
    
restart: stop start

.ONESHELL: