Skip to content

Commit

Permalink
Create entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
goatie999 authored Apr 27, 2020
1 parent 2fa2f76 commit 16a7550
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

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."
sed -i 's|#facebook|push '"$FACEBOOK_URL""$FACEBOOK_KEY"';|g' /etc/nginx/nginx.conf
else
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."
sed -i 's|#restream|push '"$RESTREAM_URL""$RESTREAM_KEY"';|g' /etc/nginx/nginx.conf
else
sed -i 's|#restream| |g' /etc/nginx/nginx.conf
fi


stunnel4

exec "$@"

0 comments on commit 16a7550

Please sign in to comment.