#!/usr/bin/env python3 """Nextcloud for the chaos hour, rebuilt clean after R-657: remove through the product, delete its kept drive folder BY NAME (the scratch box; the product itself refuses the with-data remove here, R-442), deploy again, seed A through occ.""" import sys, time sys.path.insert(0, ".") import walk as w from chaos import load, save, SIX, sub_of w.login() w.remove("nextcloud") w.say(w.guest("rm -rf /mnt/felhom-drives/scratch_hdd/userdata/nextcloud; ls /mnt/felhom-drives/scratch_hdd/userdata/ | tr '\\n' ' '")) w.deploy("nextcloud", sub_of("nextcloud")) A = SIX["nextcloud"]["fx"].seed(w, sub_of("nextcloud"), w.say) s = load(); s["apps"]["nextcloud"]["A"] = A; save(s) w.say(f"nextcloud seed A: {bool(A)}; readback: {SIX['nextcloud']['fx'].verify(w, sub_of('nextcloud'), A, w.say) if A else None}") open("chaos/00-nextcloud-rebuild.log", "w").write("\n".join(w.LOG) + "\n")