Skip to content

Instantly share code, notes, and snippets.

@scalopus
Created January 27, 2016 02:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scalopus/b3e81fb7062d4794c7ff to your computer and use it in GitHub Desktop.
Save scalopus/b3e81fb7062d4794c7ff to your computer and use it in GitHub Desktop.
Current IP Address from `ifconfig` to Slack Channel Integration
#!/bin/bash
# Tested on Ubuntu 14.04 LTS
ifconfig |grep '192.168.9'|cut -d: -f2 |awk '{print "{\"text\":\""$1"\"}"}' |curl -X POST -H 'Content-type: application/json' --data @- https://hooks.slack.com/services/<SLACKTOKEN>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment