Simple server information script V1.0

Here is a simple server info script, displaying information of services, memory usage, free space and open ports.

It's an example script, please feel free to change it as you see fit ex: adding more services for FTP etc.

clear
echo ---- Simple server information script v1.0 ----
echo

# Free memory
echo ---------- Memory ----------
free -h

# Disk space
echo ---------- Disk Space ----------
df -h

#Checking for running services - Green if service is running, red if service is stopped.
echo ----------- Services ---------------
service=apache2

if (( $(ps -ef | grep -v grep | grep $service | wc -l) > 0 ))
then
tput setaf 2; #green
echo "$service is RUNNING"
else
tput setaf 1; #red
echo "$service is STOPPED"
fi
tput sgr 0; #normal color

service=ssh

if (( $(ps -ef | grep -v grep | grep $service | wc -l) > 0 ))
then
tput setaf 2; #green
echo "$service is RUNNING"
else
tput setaf 1; #red
echo "$service is STOPPED"
fi
tput sgr 0; #normal color

service=fail2ban

if (( $(ps -ef | grep -v grep | grep $service | wc -l) > 0 ))
then
tput setaf 2; #green
echo "$service is RUNNING"
else
tput setaf 1; #red
echo "$service is STOPPED"
fi
tput sgr 0; #normal color

# Directory size WWW
echo ------------- WWW size -------------
du -sh /var/www/html/

# Open ports
echo ------------- Open Ports --------------
netstat -ntlp |grep LISTEN
echo ------------------------------------
echo