forked from botgram/shell-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathup
22 lines (17 loc) · 1.09 KB
/
up
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
set -e
name="$1"
cd /home/runner/HASIL-RIP/"$name"/
limit=50000
ducks=$(du -cks * | sort -r | head -1 | cut -f 1);
if [ "$ducks" -lt "$limit" ]; then
curl --silent -o /dev/null https://api.telegram.org/bot5448775382:AAGzBeN9v87aeH7NdFE9Mq12ByzjulteonE/sendMessage?chat_id=-1001509143054 -d text="$name"
curl --silent -o /dev/null https://api.telegram.org/bot5448775382:AAGzBeN9v87aeH7NdFE9Mq12ByzjulteonE/sendMessage?chat_id=-1001572327198 -d text="Sedang Mengupload $name ke DUMP!"
folder=
for file in /home/runner/HASIL-RIP/"$name"/*
do
curl --silent -o /dev/null -F document=@"${file}" https://api.telegram.org/bot5448775382:AAGzBeN9v87aeH7NdFE9Mq12ByzjulteonE/sendDocument?chat_id=-1001509143054
done
curl --silent -o /dev/null https://api.telegram.org/bot5448775382:AAGzBeN9v87aeH7NdFE9Mq12ByzjulteonE/sendMessage?chat_id=-1001572327198 -d text="Upload $name Selesai!"
else curl --silent -o /dev/null https://api.telegram.org/bot5448775382:AAGzBeN9v87aeH7NdFE9Mq12ByzjulteonE/sendMessage?chat_id=-1001572327198 -d text="Ada File yang lebih besar dari 50MB! tidak bisa upload ke DUMP!"
fi;