|
@@ -156,7 +156,7 @@ data=urllib.request.urlopen(url,timeout=60).read(2097153)
|
|
|
assert len(data)<=2097152 and hashlib.sha256(data).hexdigest()==expected, "sha mismatch"
|
|
assert len(data)<=2097152 and hashlib.sha256(data).hexdigest()==expected, "sha mismatch"
|
|
|
d=tempfile.mkdtemp(prefix="fmode-onboard-")
|
|
d=tempfile.mkdtemp(prefix="fmode-onboard-")
|
|
|
with tarfile.open(fileobj=io.BytesIO(data),mode="r:gz") as a: a.extractall(d,filter="data")
|
|
with tarfile.open(fileobj=io.BytesIO(data),mode="r:gz") as a: a.extractall(d,filter="data")
|
|
|
-r=subprocess.run([sys.executable,str(pathlib.Path(d)/"install.py"),"--home","/opt/data","--env-file","/opt/data/.fmode-onboarding.env"] if False else [sys.executable,str(pathlib.Path(d)/"install.py"),"--home","/opt/data"],capture_output=True,text=True)
|
|
|
|
|
|
|
+r=subprocess.run([sys.executable,str(pathlib.Path(d)/"install.py"),"--home","/opt/data"],capture_output=True,text=True)
|
|
|
print(r.returncode, r.stdout[-500:], r.stderr[-800:])
|
|
print(r.returncode, r.stdout[-500:], r.stderr[-800:])
|
|
|
PY_END'`);
|
|
PY_END'`);
|
|
|
script.push(`docker exec ${c} /command/s6-svc -r /run/service/gateway-default || docker restart ${c}`);
|
|
script.push(`docker exec ${c} /command/s6-svc -r /run/service/gateway-default || docker restart ${c}`);
|