jibri: add autoscaler-sidecar service support (#1562)

This commit is contained in:
Aaron van Meerten
2023-06-06 13:31:00 -05:00
committed by GitHub
parent 57a7c22e1d
commit 0569bce51b
6 changed files with 69 additions and 2 deletions

View File

@@ -0,0 +1,10 @@
#!/usr/bin/with-contenv 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"
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
fi