diff --git a/selfprivacy_api/services/__init__.py b/selfprivacy_api/services/__init__.py index 2967392..314094c 100644 --- a/selfprivacy_api/services/__init__.py +++ b/selfprivacy_api/services/__init__.py @@ -187,11 +187,6 @@ class ServiceManager(Service): """ pass - @staticmethod - def get_logs(): - # TODO: maybe return the logs for api itself - return "" - @classmethod def get_drive(cls) -> str: return BlockDevices().get_root_block_device().name diff --git a/selfprivacy_api/services/bitwarden/__init__.py b/selfprivacy_api/services/bitwarden/__init__.py index 358cb7e..fe5a018 100644 --- a/selfprivacy_api/services/bitwarden/__init__.py +++ b/selfprivacy_api/services/bitwarden/__init__.py @@ -104,10 +104,6 @@ class Bitwarden(Service): def restart(): subprocess.run(["systemctl", "restart", "vaultwarden.service"]) - @staticmethod - def get_logs(): - return "" - @staticmethod def get_folders() -> List[str]: return ["/var/lib/bitwarden", "/var/lib/bitwarden_rs"] diff --git a/selfprivacy_api/services/forgejo/__init__.py b/selfprivacy_api/services/forgejo/__init__.py index 350c004..e2f86b3 100644 --- a/selfprivacy_api/services/forgejo/__init__.py +++ b/selfprivacy_api/services/forgejo/__init__.py @@ -128,10 +128,6 @@ class Forgejo(Service): def restart(): subprocess.run(["systemctl", "restart", "forgejo.service"]) - @staticmethod - def get_logs(): - return "" - @staticmethod def get_folders() -> List[str]: """The data folder is still called gitea for compatibility.""" diff --git a/selfprivacy_api/services/jitsimeet/__init__.py b/selfprivacy_api/services/jitsimeet/__init__.py index ee7bc85..e317c44 100644 --- a/selfprivacy_api/services/jitsimeet/__init__.py +++ b/selfprivacy_api/services/jitsimeet/__init__.py @@ -101,10 +101,6 @@ class JitsiMeet(Service): ) subprocess.run(["systemctl", "restart", "jicofo.service"], check=False) - @staticmethod - def get_logs(): - return "" - @staticmethod def get_folders() -> List[str]: return ["/var/lib/jitsi-meet"] diff --git a/selfprivacy_api/services/mailserver/__init__.py b/selfprivacy_api/services/mailserver/__init__.py index d5dd481..05ce56a 100644 --- a/selfprivacy_api/services/mailserver/__init__.py +++ b/selfprivacy_api/services/mailserver/__init__.py @@ -89,10 +89,6 @@ class MailServer(Service): subprocess.run(["systemctl", "restart", "dovecot2.service"], check=False) subprocess.run(["systemctl", "restart", "postfix.service"], check=False) - @staticmethod - def get_logs(): - return "" - @staticmethod def get_folders() -> List[str]: return ["/var/vmail", "/var/sieve"] diff --git a/selfprivacy_api/services/nextcloud/__init__.py b/selfprivacy_api/services/nextcloud/__init__.py index 866ad03..49ff6d8 100644 --- a/selfprivacy_api/services/nextcloud/__init__.py +++ b/selfprivacy_api/services/nextcloud/__init__.py @@ -94,11 +94,6 @@ class Nextcloud(Service): """Restart Nextcloud service.""" subprocess.Popen(["systemctl", "restart", "phpfpm-nextcloud.service"]) - @staticmethod - def get_logs(): - """Return Nextcloud logs.""" - return "" - @staticmethod def get_folders() -> List[str]: return ["/var/lib/nextcloud"] diff --git a/selfprivacy_api/services/ocserv/__init__.py b/selfprivacy_api/services/ocserv/__init__.py index c180f62..ae88260 100644 --- a/selfprivacy_api/services/ocserv/__init__.py +++ b/selfprivacy_api/services/ocserv/__init__.py @@ -74,10 +74,6 @@ class Ocserv(Service): def set_configuration(cls, config_items): return super().set_configuration(config_items) - @staticmethod - def get_logs(): - return "" - @staticmethod def get_folders() -> typing.List[str]: return [] diff --git a/selfprivacy_api/services/pleroma/__init__.py b/selfprivacy_api/services/pleroma/__init__.py index 0c260a8..ac3fa1d 100644 --- a/selfprivacy_api/services/pleroma/__init__.py +++ b/selfprivacy_api/services/pleroma/__init__.py @@ -69,10 +69,6 @@ class Pleroma(Service): def set_configuration(cls, config_items): return super().set_configuration(config_items) - @staticmethod - def get_logs(): - return "" - @staticmethod def get_owned_folders() -> List[OwnedPath]: """ diff --git a/selfprivacy_api/services/prometheus/__init__.py b/selfprivacy_api/services/prometheus/__init__.py index c18a117..f095ed1 100644 --- a/selfprivacy_api/services/prometheus/__init__.py +++ b/selfprivacy_api/services/prometheus/__init__.py @@ -71,10 +71,6 @@ class Prometheus(Service): def restart(): subprocess.run(["systemctl", "restart", "prometheus.service"]) - @staticmethod - def get_logs(): - return "" - @staticmethod def get_owned_folders() -> List[OwnedPath]: return [ diff --git a/selfprivacy_api/services/roundcube/__init__.py b/selfprivacy_api/services/roundcube/__init__.py index 8349ccd..4b96ed0 100644 --- a/selfprivacy_api/services/roundcube/__init__.py +++ b/selfprivacy_api/services/roundcube/__init__.py @@ -92,10 +92,6 @@ class Roundcube(Service): check=False, ) - @staticmethod - def get_logs(): - return "" - @staticmethod def get_folders() -> List[str]: return [] diff --git a/selfprivacy_api/services/service.py b/selfprivacy_api/services/service.py index b71ee00..dc8d77e 100644 --- a/selfprivacy_api/services/service.py +++ b/selfprivacy_api/services/service.py @@ -226,11 +226,6 @@ class Service(ABC): cls.get_id(), ) - @staticmethod - @abstractmethod - def get_logs(): - pass - @classmethod def get_storage_usage(cls) -> int: """ diff --git a/selfprivacy_api/services/test_service/__init__.py b/selfprivacy_api/services/test_service/__init__.py index d5044b3..83d17cc 100644 --- a/selfprivacy_api/services/test_service/__init__.py +++ b/selfprivacy_api/services/test_service/__init__.py @@ -195,10 +195,6 @@ class DummyService(Service): def set_configuration(cls, config_items): return super().set_configuration(config_items) - @staticmethod - def get_logs(): - return "" - @staticmethod def get_storage_usage() -> int: storage_usage = 0