Answer the question
In order to leave comments, you need to log in
How to configure supervisor so that it continues to work after the crash of the script and restarts it only when it changes?
supervisord.conf
[program:service]
command=/usr/bin/supervisor -w /home/liong/Desktop/web/NODE/service -i node_modules /home/liong/Desktop/web/NODE/service/server.js
stdout_logfile=/home/liong/Desktop/web/NODE/service/std.log
stderr_logfile=/home/liong/Desktop/web/NODE/service/std.log
autostart=true
autorestart=true
user=root
stopsignal=KILL
numprocs=1
Answer the question
In order to leave comments, you need to log in
-n|--no-restart-on error|exit|success
Don't automatically restart the supervised program if it ends.
Supervisor will wait for a change in the source files.
If "error", an exit code of 0 will still restart.
If "exit", no restart regardless of exit code.
If "success", no restart only if exit code is 0.
https://www.npmjs.com/package/supervisor
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question