Browse Source

rocket chat

pull/3051/head
Daniel Gibbs 5 years ago
parent
commit
ec153297cb
  1. 9
      lgsm/functions/alert.sh
  2. 5
      lgsm/functions/alert_rocketchat.sh

9
lgsm/functions/alert.sh

@ -78,15 +78,6 @@ fn_alert_config(){
alertbody="${selfname} has received a new _default.cfg. Check file for changes."
}
if [ "${querymode}" == "2" ]||[ "${querymode}" == "3" ]; then
for queryip in "${queryips[@]}"; do
query_gamedig.sh
if [ "${querystatus}" == "0" ]; then
break
fi
done
fi
if [ "${alert}" == "permissions" ]; then
fn_alert_permissions
elif [ "${alert}" == "restart" ]; then

5
lgsm/functions/alert_rocketchat.sh

@ -14,7 +14,7 @@ fi
json=$(cat <<EOF
{
"alias": "LinuxGSM",
"text": "*${alertemoji} ${alertsubject} ${alertemoji}* \n *${servername}* \n ${alertbody}",
"text": "*${alertemoji} ${alertsubject} ${alertemoji}* \n *${servername}* \n ${alertbody} \n Hostname: ${HOSTNAME} / More info: ${alerturl}",
"attachments": [
{
"fields": [
@ -30,8 +30,7 @@ json=$(cat <<EOF
}
]
}
]
"text": "Hostname: ${HOSTNAME} / More info: ${alerturl}",
],
}
EOF
)

Loading…
Cancel
Save