# nc -z -v localhost 80
localhost [127.0.0.1] 80 (http) open
and if not , to start a script ...
something to set as a cron job maybe ?
im very new to programming , but this shouldnt be to hard ?
thanks alot
Code: Select all
if netstat -tuna | grep ':80 .*LISTEN' > /dev/null; then
# local port 80 is open
else
# isn't
fi