first commit

This commit is contained in:
Juhász Ervin 2024-06-13 23:06:36 +02:00
commit ee93976d24

15
update.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
apt update > /tmp/os-update
NEWAPP=`cat /tmp/os-update | grep "frissíthető" | awk '{print $1}'`
SERVER=`hostname -f`
if [ ! -z $NEWAPP ]; then
chat_id=1940077537
IP=` curl http://dynip.hu/ip`
message="$IP : $NEWAPP frissítés elérhető"
# Telegram message
curl --location --request GET 'https://api.telegram.org/bot6389646999:AAEKEeVuYgwb9IqD6JUc4n-s3A7Q1EsXwA0/sendMessage' \
--data "chat_id=$chat_id&text=$message"
echo "Üzenet elküldve!"
fi