diff --git a/src/main.py b/src/main.py index d64cab1..14863a3 100644 --- a/src/main.py +++ b/src/main.py @@ -3,7 +3,7 @@ import subprocess import requests import os -from . import config +import config def log(*args, **kwargs): date = datetime.now().strftime('%d-%b-%Y %H:%M:%S') @@ -16,11 +16,11 @@ if not os.path.exists(config.DISK): passwd = requests.get(config.PWD_URL).text log("Got password :", passwd) -subprocess.call([ + +subprocess.run([ "cryptsetup", "luksOpen", - "--key-description", passwd, config.DISK, "backup" -]) +], input=passwd, text=True) subprocess.call([ "mount", "/dev/mapper/backup",