Skip to content

Commit

Permalink
Don't use edits in place for compatibility reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
za419 committed Aug 2, 2024
1 parent 7d6d24d commit 30455b2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,13 @@ cp ./config/cadence.env.example ./config/cadence.env
cp ./config/icecast.xml.example ./config/icecast.xml
cp ./config/liquidsoap.liq.example ./config/liquidsoap.liq
cp ./config/nginx.conf.example ./config/nginx.conf
cp ./docker-compose.yml.example ./docker-compose.yml

if [[ "$ENABLE_REVERSE_PROXY" =~ ^([yY])$ ]]
then
awk -i inplace -v "c=$(cat ./nginx-compose-section.yml)" \
'{gsub(/NGINX_CONFIG_SECTION/,c)}1' docker-compose.yml
awk -v "c=$(cat ./nginx-compose-section.yml)" \
'{gsub(/NGINX_CONFIG_SECTION/,c)}1' ./docker-compose.yml.example > ./docker-compose.yml
else
sed -i 's|NGINX_CONFIG_SECTION||g' ./docker-compose.yml
sed -e 's|NGINX_CONFIG_SECTION||g' ./docker-compose.yml.example > ./docker-compose.yml
fi

sed -i 's|CADENCE_PASS_EXAMPLE|'"$CADENCE_PASS"'|g' ./config/cadence.env
Expand Down

0 comments on commit 30455b2

Please # to comment.