Skip to content

Commit

Permalink
Fix truncated placeholder replace
Browse files Browse the repository at this point in the history
  • Loading branch information
hartraft authored Dec 21, 2022
1 parent a2e0092 commit 6e24f39
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions start-nginx.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/usr/bin/env bash
export EXISTING_VARS=$(printenv | awk -F= '{print $1}' | sed 's/^/\$/g' | paste -sd,);
#!/usr/bin/env sh
export EXISTING_VARS=$(printenv | awk -F= '{print $1}' | sed 's/^/\$/g' | paste -sd,);
for file in $JSFOLDER;
do
cat $file | envsubst $EXISTING_VARS | tee $file
if [ ! -f $file.tmp ]
then
cp $file $file.tmp
fi
cat $file.tmp | envsubst $EXISTING_VARS | tee $file
done
nginx -g 'daemon off;'

0 comments on commit 6e24f39

Please sign in to comment.