Input password correctly
This commit is contained in:
parent
c721144f75
commit
e90661eeac
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user