2024-11-20 15:23:03 -08:00
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
import subprocess
|
|
|
|
|
import json
|
|
|
|
|
thisdir = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
|
|
|
|
|
|
with open(os.path.join(thisdir, "users.json")) as infile:
|
|
|
|
|
users = json.load(infile)
|
|
|
|
|
for username, password in users.items():
|
2025-09-27 14:48:55 -07:00
|
|
|
print(subprocess.check_output(["node", "/opt/meshcentral/meshcentral", "--createaccount", username, "--pass", password, "--name", username]))
|
2024-11-20 15:23:03 -08:00
|
|
|
|
|
|
|
|
|
2025-09-27 14:48:55 -07:00
|
|
|
print(subprocess.check_output(["node", "/opt/meshcentral/meshcentral", "--adminaccount", "admin"]))
|
2024-11-20 15:23:03 -08:00
|
|
|
|
2025-09-27 14:48:55 -07:00
|
|
|
subprocess.call(["bash", "/opt/meshcentral/entrypoint.sh"])
|