Added reboot and file append is better

This commit is contained in:
Melissa LeBlanc-Williams 2020-08-27 14:56:30 -07:00
parent 98183be79f
commit 6d52d178bb

View file

@ -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)