|
|
@ -108,7 +108,7 @@ local function ssh(command, user, host, port, identity_file) |
|
|
"ssh", |
|
|
"ssh", |
|
|
"-p", tostring(port), |
|
|
"-p", tostring(port), |
|
|
"-o", "BatchMode=yes", |
|
|
"-o", "BatchMode=yes", |
|
|
"-o", "ConnectTimeout=10", |
|
|
"-o", "ConnectTimeout=30", |
|
|
"-o", "ServerAliveInterval=5", |
|
|
"-o", "ServerAliveInterval=5", |
|
|
"-o", "ServerAliveCountMax=1", |
|
|
"-o", "ServerAliveCountMax=1", |
|
|
"-o", "UserKnownHostsFile=/root/.ssh/known_hosts", |
|
|
"-o", "UserKnownHostsFile=/root/.ssh/known_hosts", |
|
|
@ -179,7 +179,7 @@ local function main() |
|
|
ssh("wsl.exe -d Debian -- 'sudo systemctl enable ollama && sudo systemctl start ollama'", "micro", OLLAMA_HOST, SSH_PORT, SSH_IDENTITY_FILE) |
|
|
ssh("wsl.exe -d Debian -- 'sudo systemctl enable ollama && sudo systemctl start ollama'", "micro", OLLAMA_HOST, SSH_PORT, SSH_IDENTITY_FILE) |
|
|
if (port_is_up(OLLAMA_HOST, OLLAMA_PORT, 90)) then |
|
|
if (port_is_up(OLLAMA_HOST, OLLAMA_PORT, 90)) then |
|
|
log("Ollama service is reachable again.") |
|
|
log("Ollama service is reachable again.") |
|
|
socket.sleep(2) |
|
|
socket.sleep(30) |
|
|
else |
|
|
else |
|
|
log("Timeout waiting for Ollama service to come up after SSH command.") |
|
|
log("Timeout waiting for Ollama service to come up after SSH command.") |
|
|
end |
|
|
end |
|
|
|