restart-seed.sh: the snapshot file installed for the igneum user under /var/lib/igneum-v4 (the unit runs as igneum; a file under /root was unreadable and the flag did nothing, silently)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
dd9044ea5b
commit
08ddee75ad
1 changed files with 3 additions and 3 deletions
|
|
@ -19,7 +19,7 @@ SSH="ssh -i $HOME/.ssh/igneum_ed25519 -o ConnectTimeout=20 root@188.245.5.161"
|
|||
# earlier one); IGNEUM_EXEC_RESET=1 deletes the seed's persisted exec files (the tip-0 file a genesis replay writes, and the .prev)
|
||||
# while the unit is stopped. Both off by default.
|
||||
SNAPF="${IGNEUMD_EXEC_SNAPSHOT_FILE:-}"; SNAPSHA=""
|
||||
if [ -n "$SNAPF" ]; then SNAPSHA="$(shasum -a 256 "$SNAPF" | cut -c1-64)"; scp -i "$HOME/.ssh/igneum_ed25519" "$SNAPF" root@188.245.5.161:/root/v4/exec-snapshot.bin; fi
|
||||
if [ -n "$SNAPF" ]; then SNAPSHA="$(shasum -a 256 "$SNAPF" | cut -c1-64)"; scp -i "$HOME/.ssh/igneum_ed25519" "$SNAPF" root@188.245.5.161:/root/v4/exec-snapshot.bin && ssh -i "$HOME/.ssh/igneum_ed25519" root@188.245.5.161 "install -o igneum -g igneum -m 644 /root/v4/exec-snapshot.bin /var/lib/igneum-v4/exec-snapshot-recovery.bin"; fi
|
||||
RESET="${IGNEUM_EXEC_RESET:-0}"
|
||||
scp -i "$HOME/.ssh/igneum_ed25519" "$SRC" root@188.245.5.161:/root/v4/out/igneumd.039
|
||||
$SSH "set -e
|
||||
|
|
@ -31,9 +31,9 @@ $SSH "set -e
|
|||
grep -qE '^EXTRA_ARGS=\"?--override-params-file=/etc/igneum/override-v3.json' /etc/igneum/seed-v4.env
|
||||
systemctl stop igneumd-v4
|
||||
if [ '$RESET' = 1 ]; then rm -f /var/lib/igneum-v4/igneum-devnet/datadir/evm/exec-snapshot.bin /var/lib/igneum-v4/igneum-devnet/datadir/evm/exec-snapshot.prev.bin; echo 'exec files reset on the seed'; fi
|
||||
if [ -n '$SNAPSHA' ]; then test \"\$(sha256sum /root/v4/exec-snapshot.bin | cut -c1-64)\" = $SNAPSHA; python3 -c 'import sys,re; p=\"/etc/igneum/seed-v4.env\"; t=open(p).read(); out=[]
|
||||
if [ -n '$SNAPSHA' ]; then test \"\$(sha256sum /var/lib/igneum-v4/exec-snapshot-recovery.bin | cut -c1-64)\" = $SNAPSHA; python3 -c 'import sys,re; p=\"/etc/igneum/seed-v4.env\"; t=open(p).read(); out=[]
|
||||
for l in t.split(\"\\n\"):
|
||||
if l.startswith(\"EXTRA_ARGS=\"): l=\"EXTRA_ARGS=\\\"--override-params-file=/etc/igneum/override-v3.json --igneum-exec-snapshot=/root/v4/exec-snapshot.bin,0x$SNAPSHA\\\"\"
|
||||
if l.startswith(\"EXTRA_ARGS=\"): l=\"EXTRA_ARGS=\\\"--override-params-file=/etc/igneum/override-v3.json --igneum-exec-snapshot=/var/lib/igneum-v4/exec-snapshot-recovery.bin,0x$SNAPSHA\\\"\"
|
||||
out.append(l)
|
||||
open(p,\"w\").write(\"\\n\".join(out))'; grep -E '^EXTRA_ARGS=' /etc/igneum/seed-v4.env | cut -c1-160; fi
|
||||
mv -f /opt/igneum/v4/bin/igneumd.new /opt/igneum/v4/bin/igneumd
|
||||
|
|
|
|||
Loading…
Reference in a new issue