Created
June 10, 2018 14:00
-
-
Save chadfurman/ced2c00bbd7a4072a25deaded7b32684 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Get envs from environment and echo them | |
echo "Updating janus config files using variables from ENVIRONMENT" | |
## rewrite needed configurations | |
sed -i "s/wss_port = 8989;/wss_port = ${JANUS_SIGNAL_PORT};/" /opt/janus/etc/janus/janus.transport.websockets.cfg | |
sed -i "s/admin_secure_port = 7889/admin_secure_port = ${JANUS_ADMIN_PORT}/" /opt/janus/etc/janus/janus.transport.http.cfg | |
sed -i "s/rtp_port_range = 20000-40000/rtp_port_range = ${JANUS_RTP_RANGE}/" /opt/janus/etc/janus/janus.cfg | |
sed -i "s/api_secret = vcast_j4nus/api_secret = ${JANUS_SIGNAL_PASSWORD}/" /opt/janus/etc/janus/janus.cfg | |
sed -i "s/admin_secret = asdf/admin_secret = ${JANUS_ADMIN_PASSWORD}/" /opt/janus/etc/janus/janus.cfg | |
## start janus, passing through the remaining args | |
/opt/janus/bin/janus $@ 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment