Skip to content

Instantly share code, notes, and snippets.

@pravodev
Last active February 25, 2020 12:32
Show Gist options
  • Save pravodev/dc5dbbf79f1827f62d19986c3b3a3f8f to your computer and use it in GitHub Desktop.
Save pravodev/dc5dbbf79f1827f62d19986c3b3a3f8f to your computer and use it in GitHub Desktop.
Script bot telegram motionEyeOs By Rifqi Khoeruman Azam
BOT_TOKEN="token_bot_telegram"
SNAPSHOT_URL="snapshot url motionEyeOS"
USER_CHAT_ID="chat_id_telegram"
CAPTION="Motion Detected"
SCRIPT_PATH=$(dirname $(readlink -f $0))
curl -o "${SCRIPT_PATH}/output.png" $SNAPSHOT_URL
curl -X POST -F "photo=@${SCRIPT_PATH}/output.png;type=image/png" "https://api.telegram.org/bot${BOT_TOKEN}/sendPhoto?chat_id=${USER_CHAT_ID}&caption=${CAPTION}"
# Script by pravodev
# https://github.com/pravodev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment