Commit graph

3 commits

Author SHA1 Message Date
Claude
177a8d3702
Rework nightly-storeall.sh for cron-driven scheduling, add maintenance_log
nightly-storeall.sh no longer sleeps/retries internally - it's meant to
be invoked every 30 min from 21:00-06:00 by cron and does a single
check-and-maybe-act per run, so a missed/killed run just gets picked up
at the next tick instead of losing all progress. No forced fallback if
still busy at the 06:00 cutoff - that's handled manually for now.

Add maintenance_log() to upgrade-funs.sh: drops a MaintenanceLog XML file
per event into WEB-INF/storage/maintenance-log/ (atomic temp+rename) for
the webapp to pick up and route to sms/email/etc via its own machinery.
Fire-and-forget, matching the shape of MaintenanceLog.java.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tj4SF2BGFxgoRYrCAzNpDb
2026-09-30 14:11:11 +00:00
Claude
b0c2893ad7
Parameterize runcmd to support commands beyond storeall
runcmd was hardcoded to the storeall command/status-file pair. Generalizing
it now so finishcalls and dumpregistry (planned server-side additions) can
reuse the same commands.txt/status.<cmd>.$pid polling handshake instead of
needing near-duplicate copies of the function.

Signature changed from `runcmd <resultvar>` to `runcmd <resultvar> <command>
[args...]`; updated the two existing call sites (restart.sh, upgrade.sh)
accordingly. Behavior for storeall itself is unchanged - verified the
generated commands.txt line is byte-identical to before.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tj4SF2BGFxgoRYrCAzNpDb
2026-09-29 20:51:47 +00:00
Claude
54bfeb73e7
Import existing manual deploy scripts as a starting point
These are the scripts currently run by hand on the old EC2 server to do a
full upgrade (safe storeall handshake, backups, explode WAR, run the
manager schema-migration tool, restart Tomcat). Committed as-is for now to
review and refactor from, except tomcat_ctl.sh, which is already rewritten
to control Tomcat via the new Docker container's supervisord (through the
"service" shim) instead of the old host's /etc/init.d/tomcat8, since that
service doesn't exist there. Kept as a drop-in replacement: the "status"
output still contains both literal substrings upgrade.sh and restart.sh
each grep for, so neither caller needed to change yet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tj4SF2BGFxgoRYrCAzNpDb
2026-09-29 17:04:18 +00:00