Skip to content

Commit

Permalink
chore: log file removed, glauth command simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
pik4ez-canonical committed Sep 20, 2024
1 parent a863247 commit 9c8d075
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
5 changes: 0 additions & 5 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
GLAUTH_LDAP_PORT,
GRAFANA_DASHBOARD_INTEGRATION_NAME,
LDAP_CLIENT_INTEGRATION_NAME,
LOG_DIR,
LOKI_API_PUSH_INTEGRATION_NAME,
PROMETHEUS_SCRAPE_INTEGRATION_NAME,
WORKLOAD_CONTAINER,
Expand Down Expand Up @@ -247,10 +246,6 @@ def _on_pebble_ready(self, event: PebbleReadyEvent) -> None:

@wait_when(container_not_connected)
def __on_pebble_ready(self, event: PebbleReadyEvent) -> None:
if not self._container.isdir(LOG_DIR):
self._container.make_dir(path=LOG_DIR, make_parents=True)
logger.debug(f"Created logging directory {LOG_DIR}")

try:
self._certs_integration.update_certificates()
except CertificatesError:
Expand Down
6 changes: 1 addition & 5 deletions src/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

from constants import (
GLAUTH_COMMANDS,
LOG_FILE,
POSTGRESQL_DSN_TEMPLATE,
SERVER_CERT,
SERVER_KEY,
Expand Down Expand Up @@ -111,10 +110,7 @@ def render(self) -> str:
"override": "replace",
"summary": "GLAuth Operator layer",
"startup": "disabled",
"command": '/bin/sh -c "{} 2>&1 | tee {}"'.format(
GLAUTH_COMMANDS,
LOG_FILE,
),
"command": GLAUTH_COMMANDS,
}
},
})
3 changes: 0 additions & 3 deletions src/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
GLAUTH_COMMANDS = f"glauth -c {GLAUTH_CONFIG_FILE}"
GLAUTH_LDAP_PORT = 3893

LOG_DIR = PurePath("/var/log")
LOG_FILE = LOG_DIR / "glauth.log"

WORKLOAD_CONTAINER = "glauth"
WORKLOAD_SERVICE = "glauth"

Expand Down

0 comments on commit 9c8d075

Please sign in to comment.