first commit
This commit is contained in:
commit
ee93976d24
15
update.sh
Executable file
15
update.sh
Executable 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
|
||||
Loading…
Reference in New Issue
Block a user