Version: 1.0.32.0.02.0.12.0.23.0.03.0.13.0.24.0.04.0.24.1.04.1.14.1.254.1.265.0.15.0.25.0.35.0.45.0.55.0.65.0.75.0.85.0.95.0.105.0.115.0.125.0.136.0.0-06.0.0-26.0.0-36.0.0-46.0.0-56.0.0-66.0.0-76.0.0-86.0.0-96.0.0-106.0.0-116.0.0-126.0.0-136.0.0-146.0.0-156.0.0-166.0.0-176.0.0-186.0.06.0.16.0.26.0.36.0.46.0.56.1.06.1.16.1.26.2.06.2.16.2.26.2.36.2.46.2.56.2.66.2.7
#! /bin/bash
while true; do
read -p "One or more unexpected pm2 processes running. Shut down all? [y/N]" yn
case $yn in
[Yy]* ) pm2 --silent kill; break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done