Daniel Gibbs 10 rokov pred
rodič
commit
6928a32476

+ 6 - 5
lgsm/functions/alert_email.sh

@@ -213,7 +213,8 @@ fn_alert_email_template_logs(){
 	} | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"| tee -a "${emaillog}" > /dev/null 2>&1
 	} | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"| tee -a "${emaillog}" > /dev/null 2>&1
 }
 }
 
 
-fn_print_dots "Sending alert to ${email}"
+fn_print_dots "Sending alert: ${email}"
+fn_script_log_info "Sending alert: ${email}"
 info_distro.sh
 info_distro.sh
 info_config.sh
 info_config.sh
 info_glibc.sh
 info_glibc.sh
@@ -232,9 +233,9 @@ fn_alert_email_template_logs
 mail -s "${alertsubject}" "${email}" < "${emaillog}"
 mail -s "${alertsubject}" "${email}" < "${emaillog}"
 exitcode=$?
 exitcode=$?
 if [ "${exitcode}" == "0" ]; then
 if [ "${exitcode}" == "0" ]; then
-	fn_print_ok_nl "Sending alert to ${email}"
-	fn_script_log_pass "Sending alert to ${email}"
+	fn_print_ok "Sending alert: ${email}"
+	fn_script_log_pass "Sending alert: ${email}"
 else
 else
-	fn_print_fail_nl "Sending alert to ${email}"
-	fn_script_log_fatal "Sending alert to ${email}"
+	fn_print_fail "Sending alert: ${email}"
+	fn_script_log_fatal "Sending alert: ${email}"
 fi
 fi

+ 2 - 2
lgsm/functions/alert_pushbullet.sh

@@ -14,9 +14,9 @@ sleep 1
 pushbulletsend=$(curl --silent -u """${pushbullettoken}"":" -d type="note" -d body="${alertbody}" -d title="${alertsubject}" 'https://api.pushbullet.com/v2/pushes'|grep -o invalid_access_token|uniq)
 pushbulletsend=$(curl --silent -u """${pushbullettoken}"":" -d type="note" -d body="${alertbody}" -d title="${alertsubject}" 'https://api.pushbullet.com/v2/pushes'|grep -o invalid_access_token|uniq)
 
 
 if [ "${pushbulletsend}" == "invalid_access_token" ]; then
 if [ "${pushbulletsend}" == "invalid_access_token" ]; then
-	fn_print_fail_nl "Sending Pushbullet alert: invalid_access_token"
+	fn_print_fail "Sending Pushbullet alert: invalid_access_token"
 	fn_script_log_fatal "Sending Pushbullet alert: invalid_access_token"
 	fn_script_log_fatal "Sending Pushbullet alert: invalid_access_token"
 else
 else
-	fn_print_ok_nl "Sending Pushbullet alert"
+	fn_print_ok "Sending Pushbullet alert"
 	fn_script_log_pass "Sent Pushbullet alert"
 	fn_script_log_pass "Sent Pushbullet alert"
 fi
 fi