add replace cdn host function

This commit is contained in:
virusdefender 2017-12-27 22:04:06 +08:00
parent 6faf824cd4
commit 41f248091e

View File

@ -31,6 +31,12 @@ else
ln -sf https_redirect.conf http_locations.conf ln -sf https_redirect.conf http_locations.conf
fi fi
cd $APP/dist
if [ ! -z "$STATIC_CDN_HOST" ]; then
find . -name index.html -exec sed -i "s/link href=\/static/link href=\/\/$STATIC_CDN_HOST\/static/g" {} \;
find . -name index.html -exec sed -i "s/script type=text\/javascript src=\/static/script type=text\/javascript src=\/\/$STATIC_CDN_HOST\/static/g" {} \;
fi
cd $APP cd $APP
n=0 n=0