Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here an example for a script:

Code Block
languagebash
#!/bin/bash
Receiver=$1
Message=$2
curl -X POST -F "receiver=$Receiver" -F "msg=$Message" -F "apikey=YourSecretKey" https://your-domain/modules/addons/slackforwhmcs/API.php --silent

...

Then you can send messages using this command:

Code Block
languagebash
./send_slack "@channel@$#channel@$(hostname)" "My CPU temperatur is too high. Can you please check me urgently?"

...