mystic-twitupd/twitupd.sh
2021-10-15 18:06:46 +01:00

18 lines
431 B
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
MYS_DATA="/mystic/data"
MYS_LOGS="/mystic/logs"
IFS=$'\n'
for I in $(curl https://www.erb.pw/blacklist 2>/dev/null); do
CHECK=$(grep -c $I $MYS_DATA/blacklist.txt)
if [[ $CHECK -lt 1 ]]; then
echo $I >> $MYS_DATA/blacklist.txt
echo "[+] $I"
echo "$(date) [+] $I" >> $MYS_LOGS/twitupd.log
else
echo "[✔] $I"
echo "$(date) [✔] $I" >> $MYS_LOGS/twitupd.log
fi
done