From 57351ad5b5b4a24d713d58f84536ce3dbed8b331 Mon Sep 17 00:00:00 2001 From: Sean Pearce Date: Thu, 3 Jan 2019 10:59:03 -0800 Subject: [PATCH] Remove in favor of directly reading env vars --- manifest/entrypoint.sh | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/manifest/entrypoint.sh b/manifest/entrypoint.sh index 8196407..02d2486 100644 --- a/manifest/entrypoint.sh +++ b/manifest/entrypoint.sh @@ -13,32 +13,5 @@ fi procs=$(cat /proc/cpuinfo | grep processor | wc -l) sed -i -e "s/worker_processes 5/worker_processes $procs/" /etc/nginx/nginx.conf -# Very dirty hack to replace variables in code with ENVIRONMENT values -if [[ -v TEMPLATE_NGINX_HTML ]] ; then - for i in $(env) - do - variable=$(echo "$i" | cut -d'=' -f1) - value=$(echo "$i" | cut -d'=' -f2) - if [[ "$variable" != '%s' ]] ; then - replace='\$\$_'${variable}'_\$\$' - find /var/www/viewer -type f -exec sed -i -e 's#'${replace}'#'${value}'#g' {} \; - fi - done -fi - -# Very dirty hack to replace variables in conf with ENVIRONMENT values -if [[ -v TEMPLATE_PERL_CONF ]] ; then - for i in $(env) - do - variable=$(echo "$i" | cut -d'=' -f1) - value=$(echo "$i" | cut -d'=' -f2) - if [[ "$variable" != '%s' ]] ; then - replace='\$\$_'${variable}'_\$\$' - find /usr/bin -type f -name *.conf -exec sed -i -e 's#'${replace}'#'${value}'#g' {} \; - fi - done -fi - # Start supervisord and services /usr/bin/supervisord -n -c /etc/supervisord.conf -