This is an old revision of the document!
Check the service if nginx is running and if not start
#!/usr/bin/env bash # Enable System level logging # Redirect log to logger exec 1> >(logger -t $(basename $0)) 2>&1 STATUS="$(systemctl is-active nginx.service)" if [ "${STATUS}" != "active" ]; then echo "Not running starting Service : Nginx" systemctl start nginx.service fi