I'd like to set up a port monitor, unfortunately I'm useless with BASH... am I going about this the right way? This isn't the actual code obviously, but I'm hoping someone with a bit of knowledge can help me out... 8082 is my http port for dump1090.
Code:
if netstat -an | grep "8082" = null; then echo "$date : Port not up - rebooting." >> /var/log/portmon.log sudo reboot now else fi