Владимир Томишинец 5 years ago
parent
commit
80f90a0692
1 changed files with 3 additions and 2 deletions
  1. 3 2
      docker-entrypoint.sh

+ 3 - 2
docker-entrypoint.sh

@@ -8,7 +8,7 @@ if [ ! -z "${APPNET}" ]; then
         if [[ $(echo ${i}|cut -d. -f1-3) == $(dig tasks.${ADMIN_HOST}.${APPNET} +short|cut -d. -f1-3) ]];then
 #            sed -i 's/local.hostname = \${HOSTNAME}.\${APPNET}/local.hostname = ${i}/' /etc/web-registry-portal/application.conf
 #            host_ip=${i}
-            echo "TASKS_SERVICE_IP=${i}" > /vars.file
+            echo "TASKS_SERVICE_IP=${i}\nexport TASKS_SERVICE_IP" > /vars.file
         fi
     done
     echo $(dig tasks.${ADMIN_HOST}.${APPNET} +short) > /tmp/admin_ip
@@ -16,11 +16,12 @@ fi
 
 echo "#Dummy" >> /etc/rc.d/init.d/functions
 source /etc/init.d/web-registry-portal status
+source /vars.file
 rm -rf /var/run/web-registry-portal/play.pid
 
 if [ ! -z "$*" ]
 then
     exec "$@"
 else
-    exec source /vars.file; ${WEB_REGISTRY_BIN} ${WEB_REGISTRY_CUSTOM_OPTS} ${WEB_REGISTRY_OPTS}
+    exec ${WEB_REGISTRY_BIN} ${WEB_REGISTRY_CUSTOM_OPTS} ${WEB_REGISTRY_OPTS}
 fi