Commit c1a82092 by irul

Update server_info.sh

1 parent 7950d25b
......@@ -130,7 +130,7 @@ if dpkg --get-selections | grep -E '(^|\s)apache2($|\s)' &> /dev/null ; then
#echo "== Sites Available ==";
#echo -e `apache2ctl -S 2>&1 | grep "namevhost" | awk '{print "(" NR ") " $4}'`
SITES=$(echo `apache2ctl -S 2>&1 |grep "sites-en"|cut -d"/" -f5|cut -d ":" -f1|rev|cut -d"." -f2-|rev|grep -v "default"|sort|uniq`)
SITES=$(echo `apache2ctl -S 2>&1 |grep "sites-en"|cut -d"/" -f5|cut -d ":" -f1|rev|cut -d"." -f2-|rev|grep -v "default\|le-ssl"|sort|uniq`)
if [ ! -z "$SITES" ] ; then
echo "== Sites Available (Apache) ==";
......@@ -149,7 +149,7 @@ if dpkg --get-selections | grep -E '(^|\s)apache2($|\s)' &> /dev/null ; then
fi
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\|#\|_;\|server_name\|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\|le-ssl\|#\|_;\|server_name\|example"|sort|uniq`)
if [ ! -z "$SITES" ] ; then
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!