additional logging

This commit is contained in:
m0duspwnens
2020-08-14 10:30:01 -04:00
parent 0eb0551b68
commit e2fbe59b7c

View File

@@ -1374,12 +1374,14 @@ check_service_status() {
local service_name=$1 local service_name=$1
echo "Checking service $service_name status" >> "$setup_log" 2>&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=$? local status=$?
#true service is running false if not #true service is running false if not
if [ $status -gt 0 ]; then if [ $status -gt 0 ]; then
echo "$service_name is running" >> "$setup_log" 2>&1
status=1 status=1
else else
echo "$service_name is not running" >> "$setup_log" 2>&1
status=0 status=0
fi fi
@@ -1389,10 +1391,11 @@ check_service_status() {
check_salt_master_status() { check_salt_master_status() {
echo "Checking if we can talk to the salt master" >> "$setup_log" 2>&1 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=$? 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
status=0 status=0
@@ -1408,6 +1411,7 @@ 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
status=0 status=0
@@ -1459,6 +1463,8 @@ salt_checkin() {
done done
#sleep 15;
LOOP_COUNT=0 LOOP_COUNT=0
while ! check_salt_master_status; do while ! check_salt_master_status; do
echo "salt minion cannot talk to salt master" >> "$setup_log" 2>&1 echo "salt minion cannot talk to salt master" >> "$setup_log" 2>&1