mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
logging changes
This commit is contained in:
@@ -1395,9 +1395,9 @@ check_salt_master_status() {
|
|||||||
local status=$?
|
local status=$?
|
||||||
#true if there is an issue talking to salt master
|
#true if there is an issue talking to salt master
|
||||||
if [ $status -gt 0 ]; then
|
if [ $status -gt 0 ]; then
|
||||||
echo "Cannot talk to salt master" >> "$setup_log" 2>&1
|
|
||||||
status=1
|
status=1
|
||||||
else
|
else
|
||||||
|
echo "Can talk to salt master" >> "$setup_log" 2>&1
|
||||||
status=0
|
status=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -1411,9 +1411,9 @@ check_salt_minion_status() {
|
|||||||
local status=$?
|
local status=$?
|
||||||
#true if there is an issue getting a job response from the minion
|
#true if there is an issue getting a job response from the minion
|
||||||
if [ $status -gt 0 ]; then
|
if [ $status -gt 0 ]; then
|
||||||
echo "Not receiving job response from salt minion" >> "$setup_log" 2>&1
|
|
||||||
status=1
|
status=1
|
||||||
else
|
else
|
||||||
|
echo "Received job response from salt minion" >> "$setup_log" 2>&1
|
||||||
status=0
|
status=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -1421,7 +1421,6 @@ check_salt_minion_status() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
salt_checkin() {
|
salt_checkin() {
|
||||||
|
|
||||||
case "$install_type" in
|
case "$install_type" in
|
||||||
@@ -1437,6 +1436,7 @@ salt_checkin() {
|
|||||||
)
|
)
|
||||||
local LOOP_COUNT=0
|
local LOOP_COUNT=0
|
||||||
for service in "${SALT_SERVICES[@]}"; do
|
for service in "${SALT_SERVICES[@]}"; do
|
||||||
|
echo "Stopping service $service" >> "$setup_log" 2>&1
|
||||||
systemctl stop "$service" >> "$setup_log" 2>&1
|
systemctl stop "$service" >> "$setup_log" 2>&1
|
||||||
LOOP_COUNT=0
|
LOOP_COUNT=0
|
||||||
while check_service_status "$service"; do
|
while check_service_status "$service"; do
|
||||||
@@ -1449,6 +1449,7 @@ salt_checkin() {
|
|||||||
((LOOP_COUNT+=1))
|
((LOOP_COUNT+=1))
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "Starting service $service" >> "$setup_log" 2>&1
|
||||||
systemctl start "$service" >> "$setup_log" 2>&1
|
systemctl start "$service" >> "$setup_log" 2>&1
|
||||||
LOOP_COUNT=0
|
LOOP_COUNT=0
|
||||||
while ! check_service_status "$service"; do
|
while ! check_service_status "$service"; do
|
||||||
@@ -1478,9 +1479,9 @@ salt_checkin() {
|
|||||||
|
|
||||||
LOOP_COUNT=0
|
LOOP_COUNT=0
|
||||||
while ! check_salt_minion_status; do
|
while ! check_salt_minion_status; do
|
||||||
echo "salt master not getting job response from salt minion" >> "$setup_log" 2>&1
|
echo "salt master did not get a job response from salt minion" >> "$setup_log" 2>&1
|
||||||
if [ $LOOP_COUNT -gt 30 ]; then
|
if [ $LOOP_COUNT -gt 30 ]; then
|
||||||
echo "salt master not getting job response from salt minion after 30 attempts, exiting" >> "$setup_log" 2>&1
|
echo "salt master did not get a job response from salt minion after 30 attempts, exiting" >> "$setup_log" 2>&1
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sleep 1;
|
sleep 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user