86c4b9a0d8
gates / gates (push) Successful in 27s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
22 lines
1.4 KiB
Python
22 lines
1.4 KiB
Python
import sys, json, re
|
|
sys.path.insert(0, ".")
|
|
import walk as w
|
|
w.login()
|
|
import fcntl
|
|
CAT = f"{w.DRILL}/templates/nextcloud"
|
|
with open(f"{w.SC}/drill.lock", "w") as lk:
|
|
fcntl.flock(lk, fcntl.LOCK_EX)
|
|
w.sh(["git", "-C", w.DRILL, "pull", "-q", "--rebase", "origin", "main"], timeout=120)
|
|
f = open(f"{CAT}/.felhom.yml").read()
|
|
open(f"{CAT}/.felhom.yml", "w").write(re.sub(r"(healthcheck:\n\s+checks:\n\s+- type: api\n\s+port: )8999", r"\g<1>80", f, count=1))
|
|
w.sh(["git", "-C", w.DRILL, "commit", "-qam", "LIVE-B teardown: nextcloud real probe back"])
|
|
w.sh(["git", "-C", w.DRILL, "push", "-q", "origin", "main"], timeout=120)
|
|
before = w.guest("docker volume ls -q | grep -E '^nextcloud' ; ls /opt/docker/stacks/nextcloud/")
|
|
w.say("before remove:\n" + before)
|
|
code = w.remove("nextcloud")
|
|
after = w.guest("docker volume ls -q | grep -E '^nextcloud' || echo 'no nextcloud volumes (incl. undo copies)'; ls -la /opt/docker/stacks/nextcloud/; ls -d /mnt/felhom-drives/scratch_hdd/userdata/nextcloud /mnt/felhom-drives/scratch_hdd/appdata/nextcloud 2>&1")
|
|
w.say("after remove:\n" + after)
|
|
rm = w.guest("rm -rf /mnt/felhom-drives/scratch_hdd/userdata/nextcloud /mnt/felhom-drives/scratch_hdd/appdata/nextcloud && ls -d /mnt/felhom-drives/scratch_hdd/userdata/nextcloud 2>&1")
|
|
w.say("drive folders removed by name (R-442 keeps them on 9202): " + rm.strip())
|
|
open("../partB/07-teardown.log", "w").write("\n".join(w.LOG) + "\n")
|