Browse Source

feat: bypass termbin if site is down

develop
Daniel Gibbs 2 months ago
parent
commit
64980655f4
  1. 11
      lgsm/modules/command_postdetails.sh

11
lgsm/modules/command_postdetails.sh

@ -58,7 +58,15 @@ else
fi
fn_print_dots "termbin.com"
link=$(cat "${postdetailslog}" | nc termbin.com 9999 | tr -d '\n\0')
link=$(cat "${postdetailslog}" | {
nc -w 3 termbin.com 9999
echo $? > /tmp/nc_exit_status
} | tr -d '\n\0')
nc_exit_status=$(cat /tmp/nc_exit_status)
if [ "${nc_exit_status}" -ne 0 ]; then
fn_print_error_nl "Failed to post to termbin.com"
fn_script_log_error "Failed to post to termbin.com"
else
fn_print_ok_nl "termbin.com for 30D"
fn_script_log_pass "termbin.com for 30D"
pdurl="${link}"
@ -70,6 +78,7 @@ if [ "${firstcommandname}" == "POST-DETAILS" ]; then
fi
fn_script_log_info "${pdurl}"
alerturl="${pdurl}"
fi
if [ -z "${exitbypass}" ]; then
core_exit.sh

Loading…
Cancel
Save