telegram.sh | Send telegram messages right from your command line | Bot library
kandi X-RAY | telegram.sh Summary
kandi X-RAY | telegram.sh Summary
Send telegram messages right from your command line.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of telegram.sh
telegram.sh Key Features
telegram.sh Examples and Code Snippets
Community Discussions
Trending Discussions on telegram.sh
QUESTION
I'm trying to create a service using systemctl on my CentOS 7 server.
In /usr/lib/systemd/system I've this situation ...
...ANSWER
Answered 2018-Nov-13 at 15:51First, custom services should not be put in /usr/lib/systemd/system
, but in /etc/systemd/system
. Same goes with shell scripts, just put them into /usr/local/sbin
or something.
The reason why this does not work is that the script path in your service file getUpdatesTelegram.service
is wrong:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install telegram.sh
Grab the latest telegram file from this repository and put it somewhere.
Create a bot at telegram: Search for the user @botfather at telegram and start a chat with him. Use the /newbot command to create a new bot. BotFather will give you a token. Keep this.
Use your telegram client to send a message to your new bot. Any message will do.
Find your chat id. Run telegram.sh with -l: telegram -t <TOKEN> -l. If you have jq installed, it will nicely list its known chats. The number at the front is your chat id. If you don't have jq installed, it will print a bit of JSON data and tell you what to look for.
You now have your token and your chat id. Send yourself a first message: telegram -t <TOKEN> -c <CHAT ID> "Hello there."
In a file /etc/telegram.sh.conf.
In a file ~/.telegram.sh.
In environment variables TELEGRAM_TOKEN and TELEGRAM_CHAT.
As seen above as parameters.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page