Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2016-07-24 20:46:45 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-07-24 20:46:45 +0300
commit37763dcf4f6f61409defbbc7cc4cabe5482b88d7 (patch)
tree0878930e1554ec82ffd087161fb8c4cde8f4436f /include/tests_databases
parent4f578b7d71184a65d6656202e88c7a09957259de (diff)
[DBS-1880] Detection for redis
Diffstat (limited to 'include/tests_databases')
-rw-r--r--include/tests_databases28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/tests_databases b/include/tests_databases
index b57a964e..34e63a42 100644
--- a/include/tests_databases
+++ b/include/tests_databases
@@ -43,6 +43,7 @@
Display --indent 2 --text "- MySQL process status" --result "${STATUS_FOUND}" --color GREEN
LogText "Result: MySQL is active"
MYSQL_RUNNING=1
+ DATABASE_ENGINE_RUNNING=1
Report "mysql_running=${MYSQL_RUNNING}"
fi
fi
@@ -97,6 +98,7 @@
Display --indent 2 --text "- PostgreSQL processes status" --result "${STATUS_FOUND}" --color GREEN
LogText "Result: PostgreSQL is active"
POSTGRESQL_RUNNING=1
+ DATABASE_ENGINE_RUNNING=1
Report "postgresql_running=${POSTGRESQL_RUNNING}"
else
if [ ${DEBUG} -eq 1 ]; then Display --indent 2 --text "- PostgreSQL processes status" --result "${STATUS_NOT_FOUND}" --color WHITE --debug; fi
@@ -126,6 +128,7 @@
Display --indent 2 --text "- Oracle processes status" --result "${STATUS_FOUND}" --color GREEN
LogText "Result: Oracle is active"
ORACLE_RUNNING=1
+ DATABASE_ENGINE_RUNNING=1
Report "oracle_running=${ORACLE_RUNNING}"
fi
fi
@@ -151,6 +154,7 @@
Display --indent 2 --text "- DB2 instance running" --result "${STATUS_FOUND}" --color GREEN
LogText "Result: At least one DB2 instance is running"
DB2_RUNNING=1
+ DATABASE_ENGINE_RUNNING=1
Report "db2_running=${DB2_RUNNING}"
else
if [ ${DEBUG} -eq 1 ]; then Display --indent 2 --text "- DB2 instance running" --result "${STATUS_NOT_FOUND}" --color WHITE --debug; fi
@@ -160,6 +164,30 @@
#
#################################################################################
#
+ # Test : DBS-1880
+ # Description : Determine if redis is running
+ Register --test-no DBS-1880 --weight L --network NO --category security --description "Check for active Redis server"
+ if [ ${SKIPTEST} -eq 0 ]; then
+ if IsRunning redis-server; then
+ Display --indent 2 --text "- Redis (server) status" --result "${STATUS_FOUND}" --color GREEN
+ LogText "Result: Redit is running"
+ REDIS_RUNNING=1
+ DATABASE_ENGINE_RUNNING=1
+ Report "redis_running=${redis_RUNNING}"
+ else
+ if [ ${DEBUG} -eq 1 ]; then Display --indent 2 --text "- Redis (server) status" --result "${STATUS_NOT_FOUND}" --color WHITE --debug; fi
+ LogText "Result: No Redis processes are running"
+ fi
+ fi
+#
+#################################################################################
+#
+ if [ ${DATABASE_ENGINE_RUNNING} -eq 0 ]; then
+ Display --indent 4 --text "No database engines found"
+ fi
+#
+#################################################################################
+#
WaitForKeyPress