diff --git a/scripts/auto-boot-ollama-host.lua b/scripts/auto-boot-ollama-host.lua index 11fecec..c287ba6 100644 --- a/scripts/auto-boot-ollama-host.lua +++ b/scripts/auto-boot-ollama-host.lua @@ -82,6 +82,12 @@ local function createSSHKeyFilesFromEnv() return end + -- Ensure .ssh directory exists + local ssh_dir = SSH_IDENTITY_FILE:match("^(.*)/[^/]+$ + if ssh_dir then + os.execute(("mkdir -p %q && chmod 700 %q"):format(ssh_dir, ssh_dir)) + end + local priv_fh = io.open(SSH_IDENTITY_FILE, "w") if not priv_fh then log("Failed to open SSH identity file for writing: " .. SSH_IDENTITY_FILE)