fix(services): use get_foldername() for moving around

This commit is contained in:
Houkime 2023-04-17 12:54:21 +00:00
parent 1c0e3f0f92
commit 0207b5a473
3 changed files with 6 additions and 2 deletions

View file

@ -160,7 +160,7 @@ class Bitwarden(Service):
job,
[
FolderMoveNames(
name="bitwarden",
name=Bitwarden.get_foldername(folder),
bind_location=folder,
group="vaultwarden",
owner="vaultwarden",

View file

@ -158,7 +158,7 @@ class Gitea(Service):
job,
[
FolderMoveNames(
name="gitea",
name=Gitea.get_foldername(folder),
bind_location=folder,
group="gitea",
owner="gitea",

View file

@ -140,6 +140,10 @@ class Service(ABC):
# def get_folders() -> str:
# pass
@staticmethod
def get_foldername(path: str) -> str:
return path.split("/")[-1]
@abstractmethod
def move_to_volume(self, volume: BlockDevice) -> Job:
pass