From bdf123bf7bda9065696fafa84196105de16decfa Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 15 Feb 2022 08:38:16 +0100 Subject: [PATCH] fix: Stopping service without proxy --- src/routes/services/[id]/minio/stop.json.ts | 8 ++++++-- src/routes/services/[id]/nocodb/stop.json.ts | 6 +++++- src/routes/services/[id]/plausibleanalytics/stop.json.ts | 6 +++++- src/routes/services/[id]/vaultwarden/stop.json.ts | 6 +++++- src/routes/services/[id]/vscodeserver/stop.json.ts | 6 +++++- src/routes/services/[id]/wordpress/stop.json.ts | 6 +++++- 6 files changed, 31 insertions(+), 7 deletions(-) diff --git a/src/routes/services/[id]/minio/stop.json.ts b/src/routes/services/[id]/minio/stop.json.ts index 38398d202..95f227009 100644 --- a/src/routes/services/[id]/minio/stop.json.ts +++ b/src/routes/services/[id]/minio/stop.json.ts @@ -33,8 +33,12 @@ export const post: RequestHandler = async (event) => { } catch (error) { console.error(error); } - await stopTcpHttpProxy(destinationDocker, publicPort); - await configureSimpleServiceProxyOff({ domain }); + try { + await stopTcpHttpProxy(destinationDocker, publicPort); + await configureSimpleServiceProxyOff({ domain }); + } catch (error) { + console.log(error); + } } return { diff --git a/src/routes/services/[id]/nocodb/stop.json.ts b/src/routes/services/[id]/nocodb/stop.json.ts index 8874df9a5..ad48b5dce 100644 --- a/src/routes/services/[id]/nocodb/stop.json.ts +++ b/src/routes/services/[id]/nocodb/stop.json.ts @@ -27,7 +27,11 @@ export const post: RequestHandler = async (event) => { } catch (error) { console.error(error); } - await configureSimpleServiceProxyOff({ domain }); + try { + await configureSimpleServiceProxyOff({ domain }); + } catch (error) { + console.log(error); + } } return { diff --git a/src/routes/services/[id]/plausibleanalytics/stop.json.ts b/src/routes/services/[id]/plausibleanalytics/stop.json.ts index 06dc06471..c6e59277d 100644 --- a/src/routes/services/[id]/plausibleanalytics/stop.json.ts +++ b/src/routes/services/[id]/plausibleanalytics/stop.json.ts @@ -37,7 +37,11 @@ export const post: RequestHandler = async (event) => { console.error(error); } - await configureSimpleServiceProxyOff({ domain }); + try { + await configureSimpleServiceProxyOff({ domain }); + } catch (error) { + console.log(error); + } } return { diff --git a/src/routes/services/[id]/vaultwarden/stop.json.ts b/src/routes/services/[id]/vaultwarden/stop.json.ts index 8874df9a5..ad48b5dce 100644 --- a/src/routes/services/[id]/vaultwarden/stop.json.ts +++ b/src/routes/services/[id]/vaultwarden/stop.json.ts @@ -27,7 +27,11 @@ export const post: RequestHandler = async (event) => { } catch (error) { console.error(error); } - await configureSimpleServiceProxyOff({ domain }); + try { + await configureSimpleServiceProxyOff({ domain }); + } catch (error) { + console.log(error); + } } return { diff --git a/src/routes/services/[id]/vscodeserver/stop.json.ts b/src/routes/services/[id]/vscodeserver/stop.json.ts index 88406950b..f094abc6e 100644 --- a/src/routes/services/[id]/vscodeserver/stop.json.ts +++ b/src/routes/services/[id]/vscodeserver/stop.json.ts @@ -27,7 +27,11 @@ export const post: RequestHandler = async (event) => { } catch (error) { console.error(error); } - await configureSimpleServiceProxyOff({ domain }); + try { + await configureSimpleServiceProxyOff({ domain }); + } catch (error) { + console.log(error); + } } return { status: 200 diff --git a/src/routes/services/[id]/wordpress/stop.json.ts b/src/routes/services/[id]/wordpress/stop.json.ts index 669d07d55..759d183b1 100644 --- a/src/routes/services/[id]/wordpress/stop.json.ts +++ b/src/routes/services/[id]/wordpress/stop.json.ts @@ -30,7 +30,11 @@ export const post: RequestHandler = async (event) => { } catch (error) { console.error(error); } - await configureSimpleServiceProxyOff({ domain }); + try { + await configureSimpleServiceProxyOff({ domain }); + } catch (error) { + console.log(error); + } } return {