mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
additional logging
This commit is contained in:
@@ -1374,12 +1374,14 @@ check_service_status() {
|
||||
|
||||
local service_name=$1
|
||||
echo "Checking service $service_name status" >> "$setup_log" 2>&1
|
||||
systemctl status $service_name >> "$setup_log" 2>&1
|
||||
systemctl status $service_name > /dev/null 2>&1
|
||||
local status=$?
|
||||
#true service is running false if not
|
||||
if [ $status -gt 0 ]; then
|
||||
echo "$service_name is running" >> "$setup_log" 2>&1
|
||||
status=1
|
||||
else
|
||||
echo "$service_name is not running" >> "$setup_log" 2>&1
|
||||
status=0
|
||||
fi
|
||||
|
||||
@@ -1389,10 +1391,11 @@ check_service_status() {
|
||||
|
||||
check_salt_master_status() {
|
||||
echo "Checking if we can talk to the salt master" >> "$setup_log" 2>&1
|
||||
salt-call state.show_top >> "$setup_log" 2>&1
|
||||
salt-call state.show_top > /dev/null 2>&1
|
||||
local status=$?
|
||||
#true if there is an issue talking to salt master
|
||||
if [ $status -gt 0 ]; then
|
||||
echo "Cannot talk to salt master" >> "$setup_log" 2>&1
|
||||
status=1
|
||||
else
|
||||
status=0
|
||||
@@ -1408,6 +1411,7 @@ check_salt_minion_status() {
|
||||
local status=$?
|
||||
#true if there is an issue getting a job response from the minion
|
||||
if [ $status -gt 0 ]; then
|
||||
echo "Not receiving job response from salt minion" >> "$setup_log" 2>&1
|
||||
status=1
|
||||
else
|
||||
status=0
|
||||
@@ -1459,6 +1463,8 @@ salt_checkin() {
|
||||
|
||||
done
|
||||
|
||||
#sleep 15;
|
||||
|
||||
LOOP_COUNT=0
|
||||
while ! check_salt_master_status; do
|
||||
echo "salt minion cannot talk to salt master" >> "$setup_log" 2>&1
|
||||
|
||||
Reference in New Issue
Block a user