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")
|
os.system("clear")
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def reboot():
|
||||||
|
"""
|
||||||
|
Reboot the system
|
||||||
|
"""
|
||||||
|
os.system("reboot")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def is_root():
|
def is_root():
|
||||||
"""
|
"""
|
||||||
|
|
@ -158,6 +165,7 @@ class Shell:
|
||||||
"""
|
"""
|
||||||
if append:
|
if append:
|
||||||
mode = "a"
|
mode = "a"
|
||||||
|
content = "\n" + content
|
||||||
else:
|
else:
|
||||||
mode = "w"
|
mode = "w"
|
||||||
service_file = open(path, mode)
|
service_file = open(path, mode)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue