Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
goatie999 authored Apr 27, 2020
1 parent 0154b59 commit 8bd46c2
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,23 @@

set -e

if [ -n "${YOUTUBE_KEY}" ]; then
echo "Youtube activate."
sed -i 's|#youtube|push '"$YOUTUBE_URL""$YOUTUBE_KEY"';|g' /etc/nginx/nginx.conf
else
sed -i 's|#youtube| |g' /etc/nginx/nginx.conf
fi

if [ -n "${FACEBOOK_KEY}" ]; then
echo "Facebook activate."
echo "Facebook activated"
sed -i 's|#facebook|push '"$FACEBOOK_URL""$FACEBOOK_KEY"';|g' /etc/nginx/nginx.conf
else
echo "No Facebook stream key set... disabling"
sed -i 's|#facebook| |g' /etc/nginx/nginx.conf
fi

if [ -n "${INSTAGRAM_KEY}" ]; then
echo "Instagram activate."
sed -i 's|#instagram|push '"$INSTAGRAM_URL""$INSTAGRAM_KEY"';|g' /etc/nginx/nginx.conf
else
sed -i 's|#instagram| |g' /etc/nginx/nginx.conf
fi

if [ -n "${TWITCH_KEY}" ]; then
echo "Twitch activate."
sed -i 's|#twitch|push '"$TWITCH_URL""$TWITCH_KEY"';|g' /etc/nginx/nginx.conf
else
sed -i 's|#twitch| |g' /etc/nginx/nginx.conf
fi

if [ -n "${RESTREAM_KEY}" ]; then
echo "Restream.io activate."
echo "Restream.io activated"
sed -i 's|#restream|push '"$RESTREAM_URL""$RESTREAM_KEY"';|g' /etc/nginx/nginx.conf
else
echo "No Restream.io stream key set... disabling"
sed -i 's|#restream| |g' /etc/nginx/nginx.conf
fi


stunnel4

exec "$@"

0 comments on commit 8bd46c2

Please sign in to comment.