We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8deda03 commit e6d8792Copy full SHA for e6d8792
jimi_cli.py
@@ -1,2 +1,17 @@
1
-from screens import mainScreen
2
-screen = mainScreen.mainScreen()
+import sys
+
3
+if len(sys.argv) > 1:
4
+ if sys.argv[1] == "reset":
5
+ if sys.argv[2] == "root":
6
+ from core import auth
7
+ from system import install
8
+ rootUser = auth._user().getAsClass(query={ "username" : "root" })
9
+ if len(rootUser) == 1:
10
+ rootUser = rootUser[0]
11
+ rootPass = install.randomString(30)
12
+ rootUser.setAttribute("passwordHash",rootPass)
13
+ rootUser.update(["passwordHash"])
14
+ print("Password={0}".format(rootPass))
15
+else:
16
+ from screens import mainScreen
17
+ screen = mainScreen.mainScreen()
0 commit comments