Fix capitalization of MicroG and update nodataperm

This commit is contained in:
Rikka
2023-08-24 23:21:53 +08:00
parent 337d066eeb
commit e1ee7f0b0c
3 changed files with 49 additions and 18 deletions
+13
View File
@@ -1,3 +1,4 @@
import gzip
import os
import re
import platform
@@ -131,3 +132,15 @@ def check_root():
if os.geteuid() != 0:
Logger.error("This script must be run as root. Aborting.")
sys.exit(1)
def backup(path):
gz_filename = path+".gz"
with gzip.open(gz_filename, 'wb') as f_gz:
with open(path, "rb") as f:
f_gz.write(f.read())
def restore(path):
gz_filename = path+".gz"
with gzip.GzipFile(gz_filename) as f_gz:
with open(path, "wb") as f:
f.writelines(f_gz)