I need to know what to use from root side of cPanel based server to restart NodeJS app, for example, if process terminated now for some reasons NodeJS app will not start until I manually start it, same if server restart I need manually to restart it.
Also, this is case for several accounts on server, command should allow more apps to be restarted/started.
Any help would be great
pgrep -f $NAME
if [ "$RUN" == "" ]; then /home/preppers/bin/node /home/preppers/bin/pm2 start /home/preppers/public_html/lib/MooNodeJsServer/mooServer.js else echo "Script is running" fi – Giffer