I currently have a Makefile rule:
start: ./start.sh
which runs a very simple server, needed as part of the build process. I have another rule to stop the server:
stop: kill `cat bin/server.PID`
here is the start.sh script:
#!/bin/bash cd bin python server.py & echo $! > server.PID
NB server.py should be launched from the bin directory
I would like to implement the start.sh functionality at the beginning of the rule, I tried a lot of things, but I can not get the PID.
makefile pid
Chris camacho
source share