Last active
February 25, 2020 12:32
-
-
Save pravodev/dc5dbbf79f1827f62d19986c3b3a3f8f to your computer and use it in GitHub Desktop.
Script bot telegram motionEyeOs By Rifqi Khoeruman Azam
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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