diff --git a/lgsm/functions/alert_discord.sh b/lgsm/functions/alert_discord.sh
index b654189b9..c19e66506 100755
--- a/lgsm/functions/alert_discord.sh
+++ b/lgsm/functions/alert_discord.sh
@@ -53,7 +53,7 @@ fn_print_dots "Sending Discord alert"
discordsend=$(curl -sSL -H "Content-Type: application/json" -X POST -d "$(echo -n "$json" | jq -c .)" "${discordwebhook}")
-if [ "${discordsend}" ]; then
+if [ -n "${discordsend}" ]; then
fn_print_fail_nl "Sending Discord alert: ${discordsend}"
fn_script_log_fatal "Sending Discord alert: ${discordsend}"
else
diff --git a/lgsm/functions/alert_ifttt.sh b/lgsm/functions/alert_ifttt.sh
index facf90c77..7a75050a4 100755
--- a/lgsm/functions/alert_ifttt.sh
+++ b/lgsm/functions/alert_ifttt.sh
@@ -18,7 +18,7 @@ EOF
fn_print_dots "Sending IFTTT alert"
iftttsend=$(curl -sSL -H "Content-Type: application/json" -X POST -d """${json}""" "https://maker.ifttt.com/trigger/${iftttevent}/with/key/${ifttttoken}" | grep "Bad Request")
-if [ "${iftttsend}" ]; then
+if [ -n "${iftttsend}" ]; then
fn_print_fail_nl "Sending IFTTT alert: ${pushbulletsend}"
fn_script_log_fatal "Sending IFTTT alert: ${pushbulletsend}"
else
diff --git a/lgsm/functions/alert_pushbullet.sh b/lgsm/functions/alert_pushbullet.sh
index b7f576a82..7a0117a0a 100755
--- a/lgsm/functions/alert_pushbullet.sh
+++ b/lgsm/functions/alert_pushbullet.sh
@@ -19,7 +19,7 @@ EOF
fn_print_dots "Sending Pushbullet alert"
pushbulletsend=$(curl -sSL -u """${pushbullettoken}"":" -H "Content-Type: application/json" -X POST -d """${json}""" "https://api.pushbullet.com/v2/pushes" | grep "error_code")
-if [ "${pushbulletsend}" ]; then
+if [ -n "${pushbulletsend}" ]; then
fn_print_fail_nl "Sending Pushbullet alert: ${pushbulletsend}"
fn_script_log_fatal "Sending Pushbullet alert: ${pushbulletsend}"
else
diff --git a/lgsm/functions/alert_pushover.sh b/lgsm/functions/alert_pushover.sh
index 15ec676fd..56702d28b 100755
--- a/lgsm/functions/alert_pushover.sh
+++ b/lgsm/functions/alert_pushover.sh
@@ -23,7 +23,7 @@ fi
pushoversend=$(curl -sS -F token="${pushovertoken}" -F user="${pushoveruserkey}" -F html="1" -F sound="${alertsound}" -F priority="${alertpriority}" -F title="${alertemoji} ${alertsubject} ${alertemoji}" -F message="Server name
${servername}
Message
${alertbody}
Game
${gamename}
Server IP
${alertip}:${port}
Hostname
${HOSTNAME}
More info
${alerturl}" "https://api.pushover.net/1/messages.json" | grep errors)
-if [ "${pushoversend}" ]; then
+if [ -n "${pushoversend}" ]; then
fn_print_fail_nl "Sending Pushover alert: ${pushoversend}"
fn_script_log_fatal "Sending Pushover alert: ${pushoversend}"
else
diff --git a/lgsm/functions/alert_rocketchat.sh b/lgsm/functions/alert_rocketchat.sh
index ab66b637d..c7c26aeb3 100755
--- a/lgsm/functions/alert_rocketchat.sh
+++ b/lgsm/functions/alert_rocketchat.sh
@@ -42,12 +42,12 @@ EOF
fn_print_dots "Sending Rocketchat alert"
-rocketlaunch=$(curl -sSL -H "Content-Type:application/json" -X POST -d "$(echo -n "$json" | jq -c .)" "${rocketchatwebhook}")
+rocketchatsend=$(curl -sSL -H "Content-Type:application/json" -X POST -d "$(echo -n "$json" | jq -c .)" "${rocketchatwebhook}")
-if [ "${rocketlaunch}" == "ok" ]; then
+if [ -n "${rocketchatsend}" ]; then
fn_print_ok_nl "Sending Rocketchat alert"
fn_script_log_pass "Sending Rocketchat alert"
else
- fn_print_fail_nl "Sending Rocketchat alert: ${rocketlaunch}"
- fn_script_log_fatal "Sending Rocketchat alert: ${rocketlaunch}"
+ fn_print_fail_nl "Sending Rocketchat alert: ${rocketchatsend}"
+ fn_script_log_fatal "Sending Rocketchat alert: ${rocketchatsend}"
fi
diff --git a/lgsm/functions/alert_telegram.sh b/lgsm/functions/alert_telegram.sh
index 50d8661c6..64e5fcbb3 100755
--- a/lgsm/functions/alert_telegram.sh
+++ b/lgsm/functions/alert_telegram.sh
@@ -18,7 +18,7 @@ EOF
fn_print_dots "Sending Telegram alert"
telegramsend=$(curl -sSL -H "Content-Type: application/json" -X POST -d """${json}""" ${curlcustomstring} "https://api.telegram.org/bot${telegramtoken}/sendMessage" | grep "error_code")
-if [ "${telegramsend}" ]; then
+if [ -n "${telegramsend}" ]; then
fn_print_fail_nl "Sending Telegram alert: ${telegramsend}"
fn_script_log_fatal "Sending Telegram alert: ${telegramsend}"
else