···158158 # pause downloads when /var/download runs low, so a full disk can no longer
159159 # hard-wedge sabnzbd with an unrecoverable "Disk full! Forcing Pause".
160160 # sabnzbd pauses itself once free disk drops below download_free/complete_free
161161- # (auto-resuming above); this guard keeps those set to THRESH GiB. Transmission
162162- # has no equivalent, so below the threshold the guard stops all its torrents
163163- # (restarting them on recovery) and posts a Matrix alert on each transition.
161161+ # and only auto-resumes above if fulldisk_autoresume is set (default off);
162162+ # this guard keeps those at THRESH GiB / on, and additionally sends a resume
163163+ # on recovery. Transmission has no equivalent, so below the threshold the
164164+ # guard stops all its torrents (restarting them on recovery) and posts a
165165+ # Matrix alert on each transition.
164166 systemd.services.download-space-guard = {
165167 wantedBy = [ "multi-user.target" ];
166168 after = [ "sabnzbd.service" ];
···200202 --data "$body" >/dev/null || :
201203 }
202204203203- # sabnzbd pauses continuously once free disk drops below these (and
204204- # auto-resumes above). Keep them at THRESH GiB; re-assert only if changed.
205205+ # sabnzbd pauses continuously once free disk drops below these; keep
206206+ # them at THRESH GiB and auto-resume on; re-assert only if changed.
205207 for k in download_free complete_free; do
206208 grep -qxF "$k = ''${THRESH}G" "$INI" \
207209 || sab "mode=set_config§ion=misc&keyword=$k&value=''${THRESH}G"
208210 done
211211+ grep -qxF "fulldisk_autoresume = 1" "$INI" \
212212+ || sab "mode=set_config§ion=misc&keyword=fulldisk_autoresume&value=1"
209213210214 prev=ok
211215 if [ -f "$STATE" ]; then prev=$(cat "$STATE"); fi
···219223 notify "⚠️ yellow: /var/download down to ''${avail} GiB free (< ''${THRESH} GiB). Stopped all transmission torrents; sabnzbd auto-paused via download_free."
220224 fi
221225 elif [ "$prev" = low ]; then
222222- echo "free ''${avail}G >= ''${THRESH}G: resumed transmission, alerting"
226226+ echo "free ''${avail}G >= ''${THRESH}G: resumed transmission and sabnzbd, alerting"
223227 tr_remote -t all --start
224224- notify "✅ yellow: /var/download recovered to ''${avail} GiB free. Restarted transmission torrents."
228228+ sab "mode=resume"
229229+ notify "✅ yellow: /var/download recovered to ''${avail} GiB free. Resumed sabnzbd and transmission torrents."
225230 fi
226231 echo "$cur" > "$STATE"
227232 '';