diff --git a/src/lib/api.ts b/src/lib/api.ts index 9fdc053..94df723 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -1466,13 +1466,13 @@ export const servers = { post<{ success: boolean; message: string }>( `/servers/${id}/nginx/restart`, {}, - { timeoutMs: 15000 }, + { timeoutMs: 60000 }, ), restartService: (id: string, service: string) => post<{ success: boolean; message: string }>( `/servers/${id}/services/${encodeURIComponent(service)}/restart`, {}, - { timeoutMs: 15000 }, + { timeoutMs: 300000 }, ), manageWebStack: ( id: string, diff --git a/src/server/services/ssh-services/commands.ts b/src/server/services/ssh-services/commands.ts index 3e950b4..118a6f3 100644 --- a/src/server/services/ssh-services/commands.ts +++ b/src/server/services/ssh-services/commands.ts @@ -50,7 +50,7 @@ function buildTrackedCommand(command: string, runId: string) { 'wait "$child"', "code=$?", "set -e", - "exit \"$code\"", + 'exit "$code"', ].join("\n"); return `bash -lc ${shellQuote(script)}`; diff --git a/src/server/services/ssh-services/server-config.ts b/src/server/services/ssh-services/server-config.ts index 24d61b6..b2cf7d4 100644 --- a/src/server/services/ssh-services/server-config.ts +++ b/src/server/services/ssh-services/server-config.ts @@ -406,6 +406,7 @@ export async function restartNginx(server: Server): Promise { server, 'bash -lc "systemctl restart nginx || systemctl restart apache2 || systemctl restart httpd"', ), + { timeoutMs: 60000 }, ); } @@ -455,6 +456,8 @@ export async function restartManagedService( server, `bash -lc ${escapeShellArg(`systemctl restart ${normalized}`)}`, ), + // ponytail: 5m matches frontend; lower if service restart is always fast + { timeoutMs: 300000 }, ); }