From ee93976d249f01754ea46577c06f1231a468fafe Mon Sep 17 00:00:00 2001 From: ervin Date: Thu, 13 Jun 2024 23:06:36 +0200 Subject: [PATCH] first commit --- update.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 update.sh diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..f3a31e8 --- /dev/null +++ b/update.sh @@ -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 \ No newline at end of file