Updated External Scripts (experimental) (markdown)

pmow
2016-01-18 21:18:03 -05:00
parent 99319073f0
commit 0f0cb57b5c

@@ -1,13 +1,13 @@
## Telegram notification basic script ## Telegram notification basic script
# From https://gist.github.com/matriphe/9a51169508f266d97313 ### From https://gist.github.com/matriphe/9a51169508f266d97313
`#!/bin/sh` #!/bin/sh
`# Just alerts on {video_decision} as first parameter, must be specified in script settings. # Just alerts on {video_decision} as first parameter, must be specified in script settings.
`USERID="<numeric ID from @IDBot>"` USERID="<numeric ID from @IDBot>"
`KEY="<the API key from @BotFather>"` KEY="<the API key from @BotFather>"
`TIMEOUT="10"` TIMEOUT="10"
`URL="https://api.telegram.org/bot$KEY/sendMessage"` URL="https://api.telegram.org/bot$KEY/sendMessage"
`TEXT="Shit your server is transcoding something: ! Go check on it, noob!"` TEXT="Crap, your server is transcoding something: ! Go check on it, noob!"
`if [ "" != "Direct Play" ]; then` if [ "" != "Direct Play" ]; then
`curl -s --max-time $TIMEOUT -d "chat_id=$USERID&disable_web_page_preview=1&text=$TEXT" $URL > /dev/null` curl -s --max-time $TIMEOUT -d "chat_id=$USERID&disable_web_page_preview=1&text=$TEXT" $URL > /dev/null
`fi` fi