...
Here an example for a script:
Code Block | ||
---|---|---|
| ||
#!/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 | ||
---|---|---|
| ||
./send_slack "@channel@$#channel@$(hostname)" "My CPU temperatur is too high. Can you please check me urgently?" |
...