Monitor Service Port if Down execute a Bash Script November 14, 2022 by Rumi #!/bin/bash HOST_NAME="127.0.0.1" HOST_PORT="1656" if ( (exec 3<>/dev/tcp/${HOST_NAME}/${HOST_PORT}) 2> /dev/null); then echo -e "PORT: ${HOST_PORT} | ON" else cd /home/rumi/my-app/ && `node service.js` fi exit; Related