Skip to content

Send a message by telegram when the system is started, informing that it is already operational.

Notifications You must be signed in to change notification settings

azagramac/helloSystemTelegram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Send message notification Telegram on boot

Requeriments

Install packages

sudo apt update
sudo apt upgrade -y
sudo apt curl -y

Edit hello.service file to change the path where you have the hello.sh script.

ExecStart=/usr/bin/bash	/root/hello.sh

Copy the hello.service and assign it the permissions 0644

cp hello.service /etc/systemd/system/
chmod 0644 /etc/systemd/system/

Restart service, and enabled

systemctl daemon-reload
systemctl enable hello.service

Edit the script hello.sh, to add your bot token, and your chat_id, rename the chosen script to hello.sh

TOKEN_BOT="YOUR_TOKEN_BOT"
TOKEN_ID="YOUR_TOKEN_CHAT"

Assign it the permissions a+x

chmod a+x /root/hello.sh

Ready!

NanoPi

RaspberryPi

About

Send a message by telegram when the system is started, informing that it is already operational.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages