mirror of
https://github.com/HuFlungDu/pylibmeshctrl.git
synced 2026-02-20 21:52:16 +00:00
First real commit, everything implemented
This commit is contained in:
15
tests/environment/scripts/meshcentral/create_users.py
Normal file
15
tests/environment/scripts/meshcentral/create_users.py
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
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():
|
||||
subprocess.check_output(["node", "/opt/meshcentral/meshcentral", "--createaccount", username, "--pass", password, "--name", username])
|
||||
|
||||
|
||||
subprocess.check_output(["node", "/opt/meshcentral/meshcentral", "--adminaccount", "admin"])
|
||||
|
||||
subprocess.call(["bash", "/opt/meshcentral/startup.sh"])
|
||||
1
tests/environment/scripts/meshcentral/users.json
Normal file
1
tests/environment/scripts/meshcentral/users.json
Normal file
@@ -0,0 +1 @@
|
||||
{"admin": "3U6zP4iIes5ISH15XxjYLjJcCdw9jU0m", "privileged": "aiIO0zLMGsU7++FYVDNxhlpYlZ1andRB", "unprivileged": "Cz9OMV1wkVd9pXdWi4lkBAAu6TMt43MA"}
|
||||
Reference in New Issue
Block a user