#!/usr/bin/env bash echo "Initial nslookup ${HOSTNAME}.${APPNET}" nslookup ${HOSTNAME}.${APPNET} while [ $? -ne 0 ]; do echo "Waiting for ${HOSTNAME}.${APPNET} to become available" sleep 1 nslookup ${HOSTNAME}.${APPNET} done echo "Initial nslookup tasks.${ADMIN_HOST}.${APPNET}" nslookup tasks.${ADMIN_HOST}.${APPNET} while [ $? -ne 0 ]; do echo "Waiting for tasks.${ADMIN_HOST}.${APPNET} to become available" sleep 1 nslookup tasks.${ADMIN_HOST}.${APPNET} done # See Redmine 108967 ADMIN_IP=$(dig tasks.${ADMIN_HOST}.${APPNET} +short) NODE_IP=$(dig ${HOSTNAME}.${APPNET} +short) echo ${ADMIN_IP} > /tmp/admin_ip #export ${ADMIN_IP} #export ${NODE_IP} sed -i "s/DB_CLUSTER/\"${DB_CLUSTER}\"/" /etc/web-laboratory/application.conf sed -i "s/ADMIN_HOST/$(dig tasks.${ADMIN_HOST}.${APPNET} +short)/" /etc/web-laboratory/application.conf sed -i "s/NODE_HOST/$(dig ${HOSTNAME}.${APPNET} +short)/" /etc/web-laboratory/application.conf # Добавлено логирование для manager memcached. Redmine 107228 echo "de.javakaffee.web.msm.level = ${DEBUG}" >> /opt/tomcat/conf/logging.properties echo "net.spy.memcached.level = ${DEBUG}" >> /opt/tomcat/conf/logging.properties # Включение аунтификации по smb протоколу, https://corp.sdsys.ru/trac/sds/ticket/51455 if [[ ! -z $SMB_USERNAME ]]; then sed -i "s/auth-enable: false/auth-enable: true/" /etc/web-laboratory/application.conf sed -i "s/username: \"\"/username: \"${SMB_USERNAME}\"/" /etc/web-laboratory/application.conf sed -i "s/domain: \"\"/domain: \"${SMB_DOMAIN}\"/" /etc/web-laboratory/application.conf sed -i "s/password: \"\"/password: \"${SMB_PASSWORD}\"/" /etc/web-laboratory/application.conf fi source /etc/init.d/web-laboratory status exec "$@"