Added reboot and file append is better
This commit is contained in:
parent
98183be79f
commit
6d52d178bb
1 changed files with 8 additions and 0 deletions
|
|
@ -135,6 +135,13 @@ class Shell:
|
|||
"""
|
||||
os.system("clear")
|
||||
|
||||
@staticmethod
|
||||
def reboot():
|
||||
"""
|
||||
Reboot the system
|
||||
"""
|
||||
os.system("reboot")
|
||||
|
||||
@staticmethod
|
||||
def is_root():
|
||||
"""
|
||||
|
|
@ -158,6 +165,7 @@ class Shell:
|
|||
"""
|
||||
if append:
|
||||
mode = "a"
|
||||
content = "\n" + content
|
||||
else:
|
||||
mode = "w"
|
||||
service_file = open(path, mode)
|
||||
|
|
|
|||
Loading…
Reference in a new issue