From b1ca78df6638ded1f6b7273997a28f8bc4554d64 Mon Sep 17 00:00:00 2001 From: Torma Kristof Date: Sat, 19 Sep 2020 22:49:07 +0200 Subject: [PATCH] fix sed --- nginx_ingest.conf | 2 +- startscript.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nginx_ingest.conf b/nginx_ingest.conf index 63d877f..4b34148 100644 --- a/nginx_ingest.conf +++ b/nginx_ingest.conf @@ -11,7 +11,7 @@ rtmp { live on; record off; meta copy; - exec ffmpeg -i rtmp://localhost:1935/origin/___STREAMKEY___ -c copy -f flv rtmp://127.0.0.1:1935/live; + exec ffmpeg -i rtmp://localhost:1935/origin/Ykh9hy5BxLLpqk1DuretawNz9sGxX3mt -c copy -f flv rtmp://127.0.0.1:1935/live; } application live { allow publish 127.0.0.1; diff --git a/startscript.sh b/startscript.sh index 4151351..cb35061 100644 --- a/startscript.sh +++ b/startscript.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -NGINX_CONF=/etc/nginx/nginx.conf -NGINX_INGEST_CONF=/etc/nginx/nginx_ingest.conf -NGINX_RESTREAM_CONF=/etc/nginx/nginx_restream.conf +NGINX_CONF=./nginx.conf +NGINX_INGEST_CONF=./nginx_ingest.conf +NGINX_RESTREAM_CONF=./nginx_restream.conf function mfcb { local val="$4"; "$1"; eval "$2[$3]=\$val;"; }; function val_ltrim { if [[ "$val" =~ ^[[:space:]]+ ]]; then val="${val:${#BASH_REMATCH[0]}}"; fi; }; function val_rtrim { if [[ "$val" =~ [[:space:]]+$ ]]; then val="${val:0:${#val}-${#BASH_REMATCH[0]}}"; fi; }; @@ -26,7 +26,7 @@ if [[ $NGINX_TYPE == "ingest" ]]; then else NGINX_STREAM_KEY="${STREAM_KEY}" fi - sed -i 's@___STREAMKEY___@'"$NGINX_STREAM_KEY"'@' $NGINX_INGEST_CONF > $NGINX_CONF + sed 's@___STREAMKEY___@'"$NGINX_STREAM_KEY"'@' $NGINX_INGEST_CONF > $NGINX_CONF else if [[ -z "${PUSH_URLS}" ]]; then echo -e "Envvar PUSH_URLS required" @@ -39,7 +39,7 @@ else : NGINX_PUSH_URLS=$NGINX_PUSH_URLS$'push '$i$'\n' done - sed -i 's@___PUSH_DIRECTIVES___@'"$NGINX_PUSH_URLS"'@' $NGINX_RESTREAM_CONF > $NGINX_CONF + sed 's@___PUSH_DIRECTIVES___@'"$NGINX_PUSH_URLS"'@' $NGINX_RESTREAM_CONF > $NGINX_CONF fi fi