From 5325d11ba80c4dd382683dc5e9f8a0462372e8f7 Mon Sep 17 00:00:00 2001 From: MateoPeri Date: Mon, 7 Mar 2022 20:34:01 +0000 Subject: [PATCH] updated init script to support openvscode-server --- root/etc/cont-init.d/98-ssl-config | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/root/etc/cont-init.d/98-ssl-config b/root/etc/cont-init.d/98-ssl-config index 9b6a886..b975844 100644 --- a/root/etc/cont-init.d/98-ssl-config +++ b/root/etc/cont-init.d/98-ssl-config @@ -1,5 +1,10 @@ #!/usr/bin/with-contenv bash -echo "**** adding --cert and --cert-key parameters to code-server startup ****" - -sed -i 's/\/bin\/code-server \\/\/bin\/code-server \\\n --cert ${SSL_CERT_PATH} \\\n --cert-key ${SSL_KEY_PATH} \\/g' /etc/services.d/code-server/run +if [ -f "/etc/services.d/openvscode-server/run" ]; +then + echo "**** adding --cert and --cert-key parameters to openvscode-server startup ****" + sed -i 's/\/app\/openvscode-server\/bin\/openvscode-server \\/\/app\/openvscode-server\/bin\/openvscode-server \\\n --cert ${SSL_CERT_PATH} \\\n --cert-key ${SSL_KEY_PATH} \\/g' /etc/services.d/openvscode-server/run +else + echo "**** adding --cert and --cert-key parameters to code-server startup ****" + sed -i 's/\/bin\/code-server \\/\/bin\/code-server \\\n --cert ${SSL_CERT_PATH} \\\n --cert-key ${SSL_KEY_PATH} \\/g' /etc/services.d/code-server/run +fi \ No newline at end of file