I used to run a WebSocket server as a Node process on an AWS EC2 instance:
node websocket/index.js
Now I'm trying to use daemontools' supervise to execute this process to ensure it restarts in case it stops or dies for some reason. I'm running it from inside the directory using:
#!/bin/sh
node websocket/index.js
The following is my ./run file:
#!/bin/sh
node websocket/index.js
To test this out, I force-kill the process and supervise restarts it correctly. But every day when I check it, both the Node process and the supervise process are dead. The system is not rebooting. I do not know why this is happening repeatedly. How do I prevent the supervision process from dying?