From f7435f3e57f00a4bb96ae46ed8566a5868f8ff49 Mon Sep 17 00:00:00 2001
From: Michal Kostenec <kostenec@civ.zcu.cz>
Date: Wed, 9 May 2012 20:32:56 +0200
Subject: [PATCH] Oprava skriptu getWebStatus.sh

---
 src/warden-server/bin/getWebStatus.sh | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/warden-server/bin/getWebStatus.sh b/src/warden-server/bin/getWebStatus.sh
index 78b9b0e..726e0ac 100755
--- a/src/warden-server/bin/getWebStatus.sh
+++ b/src/warden-server/bin/getWebStatus.sh
@@ -1,19 +1,19 @@
 #!/bin/bash
 
-DB_NAME=`cat /opt/warden-server/etc/warden-server.conf | grep DB_NAME | sed 's/[";]//g' |awk '{print $3}'`
-DB_USER=`cat /opt/warden-server/etc/warden-server.conf | grep DB_USER | sed 's/[";]//g' |awk '{print $3}'`
-DB_PASS=`cat /opt/warden-server/etc/warden-server.conf | grep DB_PASS | sed 's/[";]//g' |awk '{print $3}'`
-DB_HOST=`cat /opt/warden-server/etc/warden-server.conf | grep DB_HOST | sed 's/[";]//g' |awk '{print $3}'`
+DB_NAME=`cat /opt/warden-server/etc/warden-server.conf | grep '$DB_NAME' | sed 's/[";]//g' |awk '{print $3}'`
+DB_USER=`cat /opt/warden-server/etc/warden-server.conf | grep '$DB_USER' | sed 's/[";]//g' |awk '{print $3}'`
+DB_PASS=`cat /opt/warden-server/etc/warden-server.conf | grep '$DB_PASS' | sed 's/[";]//g' |awk '{print $3}'`
+DB_HOST=`cat /opt/warden-server/etc/warden-server.conf | grep '$DB_HOST' | sed 's/[";]//g' |awk '{print $3}'`
 
 echo "DB_NAME: $DB_NAME"
 echo "DB_USER: $DB_USER"
-echo "DB_PASS: $DB_PASS"
+#echo "DB_PASS: $DB_PASS"
 echo "DB_HOST: $DB_HOST"
 echo
 
 echo "DB status:"
 echo "----------"
-echo "SELECT FROM_UNIXTIME( UNIX_TIMESTAMP( received ) - ( UNIX_TIMESTAMP( received ) % ( 60 ) ) ) AS t, COUNT( id ) FROM events GROUP BY t" | mysql -h $DB_HOST --user=$DB_USER $DB_NAME --password='w4rd3n&r00t'
+echo "SELECT FROM_UNIXTIME( UNIX_TIMESTAMP( received ) - ( UNIX_TIMESTAMP( received ) % ( 60 ) ) ) AS t, COUNT( id ) FROM events GROUP BY t" | mysql -h $DB_HOST --user=$DB_USER $DB_NAME --password=$DB_PASS
 echo
 echo "apache2ctl status:"
 echo "------------------"
@@ -23,6 +23,6 @@ echo "uptime:"
 echo "-------"
 uptime
 echo 
-#echo -n klientu: ; netstat -nlpa | grep :443 | grep ESTA | wc -l;
+echo -n klientu: ; netstat -nlpa | grep :443 | grep ESTA | wc -l;
 echo -n FIN:; netstat | grep WAIT2 | wc -l
 
-- 
GitLab