SHARE
TWEET

Untitled

a guest Aug 14th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. #Slack
  3. doSlackNotification() {
  4.     curl -X POST \
  5.     -H 'Content-type: application/json' \
  6.     --data '{
  7.            "attachments": [
  8.                {
  9.                    "title": "'$1'",
  10.                    "pretext": "'$2' has been reloaded",
  11.                    "text": "'$(date +%Y-%m-%d)' - *'$2'* is ready!",
  12.                    "color": "#36a64f",
  13.                    "mrkdwn_in": [
  14.                        "text",
  15.                        "pretext"
  16.                    ]
  17.                }
  18.            ]
  19.            }' \
  20.     https://hooks.slack.com/services/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
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top