Fix issues with seed status script
This commit is contained in:
parent
c54c4d785f
commit
06b1c8e98a
@ -13,17 +13,23 @@ SEED_COUNT=$(curl --request GET \
|
||||
if [ "$SEED_COUNT" -le "0" ]; then
|
||||
if [ ! -f /tmp/seed-timestamp.txt ]; then
|
||||
echo $TIME > /tmp/seed-timestamp.txt;
|
||||
|
||||
/Users/noahheague/.config/scripts/util/webhook.sh \
|
||||
-c "torrent" \
|
||||
-m "Seeding has paused!"
|
||||
|
||||
fi;
|
||||
|
||||
SAVED_TIME=$(cat /tmp/seed-timestamp.txt)
|
||||
echo "Saved Timestamp: $SAVED_TIME"
|
||||
echo "Current Time: $TIME"
|
||||
SAVED_TIME_PLUS=$(( $SAVED_TIME + 86400 ));
|
||||
echo "Plus: $SAVED_TIME_PLUS"
|
||||
|
||||
if [ $TIME -ge $SAVED_TIME_PLUS ]; then
|
||||
echo $TIME > /tmp/seed-timestamp.txt;
|
||||
|
||||
if [ $SAVED_TIME_PLUS -ge $TIME ]; then
|
||||
Users/noahheague/.config/scripts/util/webhook.sh \
|
||||
/Users/noahheague/.config/scripts/util/webhook.sh \
|
||||
-c "torrent" \
|
||||
-m "Seeding has been paused."
|
||||
-m "Seeding is still paused!"
|
||||
fi
|
||||
else
|
||||
rm /tmp/seed-timestamp.txt 2> /dev/null || true
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user