this post-receive seems to work.
it asks for killing the pm2 processes as a background task, then wait 5 seconds, then ask again
usually the second time works immediatly if blocks the first time