Fix capitalization of MicroG and update nodataperm
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user