diff --git a/jvb/rootfs/etc/supervisor/conf.d/20_autoscaler_sidecar.conf b/jvb/rootfs/etc/supervisor/conf.d/20_autoscaler_sidecar.conf new file mode 100644 index 0000000000..606812a324 --- /dev/null +++ b/jvb/rootfs/etc/supervisor/conf.d/20_autoscaler_sidecar.conf @@ -0,0 +1,6 @@ +[program:jvb-autoscaler-sidecar] +command=/bin/bash -c "/usr/bin/service_wrapper_autoscaler_sidecar" +autorestart=unexpected +stdout_logfile=/dev/fd/1 +stdout_logfile_maxbytes=0 +redirect_stderr=true diff --git a/jvb/rootfs/etc/services.d/50-autoscaler-sidecar/run b/jvb/rootfs/usr/bin/service_wrapper_autoscaler_sidecar similarity index 58% rename from jvb/rootfs/etc/services.d/50-autoscaler-sidecar/run rename to jvb/rootfs/usr/bin/service_wrapper_autoscaler_sidecar index 22f775088e..f811d97306 100644 --- a/jvb/rootfs/etc/services.d/50-autoscaler-sidecar/run +++ b/jvb/rootfs/usr/bin/service_wrapper_autoscaler_sidecar @@ -1,10 +1,10 @@ -#!/usr/bin/with-contenv bash +#!/bin/bash if [[ -n "$AUTOSCALER_URL" ]] && [[ -f "/etc/jitsi/autoscaler-sidecar/config" ]]; then DAEMON="/usr/bin/node /usr/share/jitsi-autoscaler-sidecar/app.js" - exec s6-setuidgid autoscaler-sidecar /bin/bash -c ". /etc/jitsi/autoscaler-sidecar/config && exec $DAEMON" + /bin/bash -c ". /etc/jitsi/autoscaler-sidecar/config && exec $DAEMON" else # if autoscaler-sidecar should not be started, # prevent s6 from restarting this script again and again - s6-svc -O /var/run/s6/services/50-autoscaler-sidecar + supervisorctl stop jvb-autoscaler-sidecar fi