From 1320664bb1907843320cf2b1b0dc1a6fd9d9217b Mon Sep 17 00:00:00 2001 From: kx1t <15090643+kx1t@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:28:32 -0500 Subject: [PATCH] Update masto_expire.sh --- rootfs/scripts/masto_expire.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rootfs/scripts/masto_expire.sh b/rootfs/scripts/masto_expire.sh index cf58304..7ac9388 100755 --- a/rootfs/scripts/masto_expire.sh +++ b/rootfs/scripts/masto_expire.sh @@ -24,8 +24,10 @@ delete_toot() { local toot_id="$1" local result if ! result="$(curl -s --fail -X DELETE -H "Authorization: Bearer $ACCESS_TOKEN" "$INSTANCE_URL/api/v1/statuses/$toot_id" 2>&1)"; then - echo "" - "${s6wrap[@]}" echo "error deleting $toot_id: $result" + if chk_enabled "$MASTODON_DEBUG"; then + echo "" + "${s6wrap[@]}" echo "error deleting $toot_id: $result" + fi fi } @@ -94,4 +96,4 @@ while : ; do output+=("($unexpired unexpired; $expired expired; oldest $(date -d "@$oldest") ($(( (now - oldest)/(60*60*24) )) days); newest $(date -d "@$newest") ($(( (now - newest)/(60*60*24) )) days))") "${s6wrap[@]}" echo "${output[@]}" fi -done \ No newline at end of file +done