Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-04-24 16:23:22 +03:00
parent 609e9a00b4
commit bc6d66cd88
No known key found for this signature in database
1 changed files with 7 additions and 6 deletions

View File

@ -32,7 +32,8 @@ class DockerInlineSSH:
self.host = host self.host = host
self.keypair = keypair self.keypair = keypair
self.config_path = SSH_CONFIG_DIR / Path(self.host + ".conf") self.config_path = SSH_CONFIG_DIR / Path(self.host + ".conf")
if not open(self.config_path, "w").writable(): with open(self.config_path, "w", encoding="utf-8") as _config:
if not _config.writable():
# SSH Config file already exists and there's no header from us, meaning that it's # SSH Config file already exists and there's no header from us, meaning that it's
# been externally mapped into the container for more complex configs # been externally mapped into the container for more complex configs
raise SSHManagedExternallyException( raise SSHManagedExternallyException(