restart-seed.sh: the EXTRA_ARGS line rewritten whole and quoted on the seed (python, not sed)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
c4e6de2052
commit
4250fc84ca
1 changed files with 5 additions and 1 deletions
|
|
@ -31,7 +31,11 @@ $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; sed -i -E 's/ --igneum-exec-snapshot=[^ ]+//' /etc/igneum/seed-v4.env; sed -i -E 's#^EXTRA_ARGS=(.*)\$#EXTRA_ARGS=\1 --igneum-exec-snapshot=/root/v4/exec-snapshot.bin,0x$SNAPSHA#' /etc/igneum/seed-v4.env; grep -E '^EXTRA_ARGS=' /etc/igneum/seed-v4.env | cut -c1-160; 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=[]
|
||||
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\\\"\"
|
||||
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
|
||||
systemctl start igneumd-v4
|
||||
sleep 10; systemctl is-active igneumd-v4; systemctl show -p ActiveEnterTimestamp,MainPID igneumd-v4
|
||||
|
|
|
|||
Loading…
Reference in a new issue