I was thinking in using my ZM server to be able to send instant messages to my phone with the pictures or videos. I found some information about how to send instant messaging with WhatsApp, but the company has changed the auth process, so I moved to Telegram (http://www.telegram.org).
You need to install expect (apt-get install expect).
Right now, I have Telegram CLI working in my ZM server (easy, just followed some instructions detailed here https://github.com/vysheng/tg), and wrote a simple bash script that allows me to send a message and a picture of the event.
This is the script, adapted from many different sources on the web:
Code: Select all
#!/usr/bin/expect set user [lindex $argv 0] set text [lindex $argv 1] set image [lindex $argv 2] set video [lindex $argv 3] # this is the path where telegram CLI is installed and the public key for the server spawn /usr/src/telegram/tg-master/telegram -k /usr/src/telegram/tg-master/tg.pub expect "User" send "msg $user $text\r" send "send_photo $user $image\r" send "send_video $user $video\r" expect "Sent:" send "safe_quit\r" expect eof