Commit 4cffc193 by irul

Update server_info.sh

1 parent 40667698
...@@ -34,11 +34,11 @@ echo -e "Memory(RAM): "`free -mht| awk '/Mem/{print $2 " |Used: "$3 " |Free: "$4 ...@@ -34,11 +34,11 @@ echo -e "Memory(RAM): "`free -mht| awk '/Mem/{print $2 " |Used: "$3 " |Free: "$4
echo -e "Swap Memory: "`free -mht| awk '/Swap/{print $2 " |Used: "$3 " |Free: "$4}'` echo -e "Swap Memory: "`free -mht| awk '/Swap/{print $2 " |Used: "$3 " |Free: "$4}'`
echo "" echo ""
MTYPE=$(echo `vserver=$(lscpu | grep Hypervisor | wc -l); echo $vserver`) # MTYPE=$(echo `vserver=$(lscpu | grep Hypervisor | wc -l); echo $vserver`)
if [ $MTYPE -eq 0 ]; then # if [ $MTYPE -eq 0 ]; then
#echo -e "Disk Usage: "`df -h --total | grep "/dev/" | grep -v "loop" | grep -v "tmpfs" | sort` #echo -e "Disk Usage: "`df -h --total | grep "/dev/" | grep -v "loop" | grep -v "tmpfs" | sort`
echo -e "== Disk Usage == " echo -e "== Disk Usage == "
df -h --total | grep -v "loop" | grep -v "tmpfs" | grep -v "udev" | while read -r line ; do df -h --total | grep -v "loop\|tmpfs\|udev\|none\|shm" | while read -r line ; do
if grep -q "Sistem" <<< "$line" || grep -q "Filesystem" <<< "$line" || grep -q "total" <<< "$line"; then if grep -q "Sistem" <<< "$line" || grep -q "Filesystem" <<< "$line" || grep -q "total" <<< "$line"; then
str="[_] $line" str="[_] $line"
echo "${str/total/Total}" echo "${str/total/Total}"
...@@ -47,7 +47,7 @@ if [ $MTYPE -eq 0 ]; then ...@@ -47,7 +47,7 @@ if [ $MTYPE -eq 0 ]; then
fi fi
done done
echo "" echo ""
fi # fi
echo -e "== Base Application ==" echo -e "== Base Application =="
...@@ -149,7 +149,7 @@ if dpkg --get-selections | grep -E '(^|\s)apache2($|\s)' &> /dev/null ; then ...@@ -149,7 +149,7 @@ if dpkg --get-selections | grep -E '(^|\s)apache2($|\s)' &> /dev/null ; then
fi fi
if dpkg --get-selections | grep -E '(^|\s)nginx($|\s)' &> /dev/null ; then if dpkg --get-selections | grep -E '(^|\s)nginx($|\s)' &> /dev/null ; then
SITES=$(echo `grep server_name /etc/nginx/sites-enabled/* -RiI|cut -d"/" -f5-|cut -d":" -f1|rev|cut -d"." -f2-|rev|grep -v "default"|grep -v "#"|grep -v "_;"|grep -v "server_name"|grep -v "example"|sort|uniq`) SITES=$(echo `grep server_name /etc/nginx/sites-enabled/* -RiI|cut -d"/" -f5-|cut -d":" -f1|rev|cut -d"." -f2-|rev|grep -v "default\|#\|_;\|server_name\|example"|sort|uniq`)
if [ ! -z "$SITES" ] ; then if [ ! -z "$SITES" ] ; then
echo "== Sites Available (Nginx) =="; echo "== Sites Available (Nginx) ==";
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!