cd ..
root@paste:~/FXR3gRY-d_$cat paste
paste://FXR3gRY-d_PUBLIC
public paste

Restart All Online PM2 Processes (Linux)

—7 views314 chars314 B

stdout

Paste content

>_rustauto-detected
pm2 jlist | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{const ids=JSON.parse(s).filter(p=>p.pm2_env.status==="online").map(p=>String(p.pm2_env.pm_id));if(ids.length)require("child_process").spawnSync("pm2",["restart",...ids],{stdio:"inherit"});else console.log("There is no online process")})'

$ tail -f comments.log

Comments [0]

// no comments yet