Loading poolpay/vault/Vault.py +8 −0 Original line number Diff line number Diff line from dataclasses import dataclass from os import getgid, getuid from pathlib import Path from subprocess import CalledProcessError, run from uuid import uuid4 Loading Loading @@ -46,6 +47,13 @@ class Vault: ) self._cryptsetup_open(password) run(["sudo", "mkfs.ext4", "-L", "poolpay-vault", f"{self._mapper}"], check=True) self._mount() run( ["sudo", "chown", f"{getuid()}:{getgid()}", f"{self.mountpoint}"], check=True, ) self._umount() self._cryptsetup_close() def _cryptsetup_open(self, password: str) -> None: Loading Loading
poolpay/vault/Vault.py +8 −0 Original line number Diff line number Diff line from dataclasses import dataclass from os import getgid, getuid from pathlib import Path from subprocess import CalledProcessError, run from uuid import uuid4 Loading Loading @@ -46,6 +47,13 @@ class Vault: ) self._cryptsetup_open(password) run(["sudo", "mkfs.ext4", "-L", "poolpay-vault", f"{self._mapper}"], check=True) self._mount() run( ["sudo", "chown", f"{getuid()}:{getgid()}", f"{self.mountpoint}"], check=True, ) self._umount() self._cryptsetup_close() def _cryptsetup_open(self, password: str) -> None: Loading