Skip to content

Commit

Permalink
Update PKIServer.create_logs_dir()
Browse files Browse the repository at this point in the history
The PKIServer.create_logs_dir() has been updated to always create
the backup folder since the CI expects the folder to exist even if
there are no upgrade scripts for the current version.
  • Loading branch information
edewata committed Feb 19, 2025
1 parent 1b95eb4 commit a6e1ef9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions base/server/python/pki/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,10 @@ def create_logs_dir(self, exist_ok=False):
# Create /var/log/pki/<instance>
self.makedirs(self._logs_dir, exist_ok=exist_ok)

# Create /var/log/pki/<instance>/backup
backup_dir = os.path.join(self._logs_dir, 'backup')
self.makedirs(backup_dir, exist_ok=exist_ok)

# Link /var/lib/pki/<instance>/logs to /var/log/pki/<instance>
self.symlink(self._logs_dir, self.logs_dir, exist_ok=exist_ok)

Expand All @@ -848,6 +852,10 @@ def create_logs_dir(self, exist_ok=False):
# Create /var/lib/pki/<instance>/logs
self.makedirs(self.logs_dir, exist_ok=exist_ok)

# Create /var/lib/pki/<instance>/logs/backup
backup_dir = os.path.join(self.logs_dir, 'backup')
self.makedirs(backup_dir, exist_ok=exist_ok)

def create_libs(self, force=False): # pylint: disable=W0613

lib_dir = os.path.join(PKIServer.SHARE_DIR, 'server', 'lib')
Expand Down

0 comments on commit a6e1ef9

Please sign in to comment.