Created
February 13, 2018 17:32
-
-
Save fijimunkii/61bf2b4d528d519520a5f4fde974771d to your computer and use it in GitHub Desktop.
loop through pm2 jlist array
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pm2 jlist | jq 'map(.pm_id) | .[]' -r | xargs -I pm_id sh -c '{ pm2 restart pm_id; sleep 5; }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment