Files
felhom.eu/documentation/audits/night-2026-10-21/tools/soakrun.sh
T

14 lines
797 B
Bash
Executable File

#!/bin/bash
# soakrun.sh MINUTES — night 2026-10-21 Part 1 on the helper CT: the rehearsal's first uploads (load.py: Paperless 53
# PDFs, Immich first admin + 306 photos, the Nextcloud tree), then load2.py's fresh-work cycles until MINUTES have
# passed since the start. The env file (IRISZ, ODON, COOKIE) is read into memory and shredded at once.
cd /root
ENVD=$(cat /root/.soakenv); shred -u /root/.soakenv
t0=$(date +%s)
echo "$(date -u +%T) SOAK START $1 min" >> /root/soak.log
python3 /root/load.py <<< "$ENVD" > /root/load.log 2>&1
left=$(( ($1*60 - ($(date +%s)-t0)) / 60 ))
echo "$(date -u +%T) first uploads done; cycles for $left min" >> /root/soak.log
[ $left -gt 0 ] && python3 /root/load2.py $left <<< "$ENVD" > /root/proof.log 2>&1
echo "$(date -u +%T) SOAK END" >> /root/soak.log