From 25457e8fee2746fbe5c28116832dd765b1d246cd Mon Sep 17 00:00:00 2001 From: Alin CALINCIUC Date: Sun, 20 Nov 2016 14:16:14 +0200 Subject: [PATCH] Update monitoring.sh --- src/main/resources/scripts/monitoring.sh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/main/resources/scripts/monitoring.sh b/src/main/resources/scripts/monitoring.sh index 022ddf38..74e6d632 100644 --- a/src/main/resources/scripts/monitoring.sh +++ b/src/main/resources/scripts/monitoring.sh @@ -1,9 +1,18 @@ #!/bin/bash -#HOSTNAME=$(cat /etc/hostname) -#sed -i -e "s/HOSTNAMEMONITORING/$HOSTNAME/g" /etc/collectd/collectd.conf -#MONITORING_URL='172.22.28.70' -#sed -i -e "s/172.22.2.70/$MONITORING_URL/g" /etc/collectd/collectd.conf -#/etc/init.d/collectd restart -#HOSTNAME_MONITORING="HOSTNAMEMONITORING" +mkdir -p /opt/ +echo export NUBOMEDIASTUNSERVERADDRESS=NUBOMEDIA_STUN_SERVER_ADDRESS > /opt/envvars +echo export NUBOMEDIASTUNSERVERPORT=3478 >> /opt/envvars +echo export NUBOMEDIATURNSERVERADDRESS=NUBOMEDIA_TURN_SERVER_ADDRESS >> /opt/envvars +echo export NUBOMEDIATURNSERVERPORT=3478 >> /opt/envvars +echo export NUBOMEDIAMONITORINGIP=NUBOMEDIA_MONITORING_IP >> /opt/envvars + +cd /root/deploy && git pull origin master +mv /root/deploy/WebRtcEndpoint.conf.ini /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini +mv /root/deploy/fix.sh /usr/local/bin/ +mv /root/deploy/logstash-forwarder.conf /etc/logstash-forwarder.conf +mv /root/deploy/collectd.conf /etc/collectd/collectd.conf + +# Update the configurations +bash /usr/local/bin/fix.sh sed -i -e "s/HOSTNAMEMONITORING/$HOSTNAME/g" /etc/collectd/collectd.conf
 -service collectd restart \ No newline at end of file +service collectd restart