0

I'm using a Git post-receive hook on my server so that whenever I push an update to the server, it will check out the new code, kill the currently running Node app and then restart the Node app. The problem is that the client will never disconnect during a push to that server because it is waiting for the Node process to finish before disconnecting. I've tried using & at the end, nohup and & together, and adding exit 0 to the end of it after the &.

Any ideas how I can achieve this?

Joe Zim
  • 1,787
  • 1
  • 15
  • 16

1 Answers1

0

I found the answer here:

nohup /usr/local/bin/my_script &>/dev/null &

Apparently I needed the &>/dev/null bit in there.

Joe Zim
  • 1,787
  • 1
  • 15
  • 16