Fix first start Monit Docker mode
@@ -47,7 +47,7 @@ then
GLOBAL_MONITOR_SCRIPT_FILE=/opt/datafari/bin/monitorUtils/global_monitor_script.sh
if test -f "$GLOBAL_MONITOR_SCRIPT_FILE"; then
sed -i -e '/^[[:space:]]*#Start Debian Glances conf/,/^[[:space:]]*#End Debian Glances conf/{/^[[:space:]]*#Start Debian Glances conf/!{/^[[:space:]]*#End Debian Glances conf/!d}}' $GLOBAL_MONITOR_SCRIPT_FILE
- glancesDockerSection=' cp $MONITOR_PATH/$MONIT_FILE /etc/monit/\n cp $MONITOR_PATH/glances.conf /etc/glances/glances.conf\n cp $MONITOR_PATH/glances.conf /etc/glances/glances.conf\n chown root:root /etc/monit/monitrc\n chmod 700 /etc/monit/monitrc\n /usr/local/bin/glances -w &'
+ glancesDockerSection=' cp $MONITOR_PATH/$MONIT_FILE /etc/monit/\n cp $MONITOR_PATH/glances.conf /etc/glances/glances.conf\n cp $MONITOR_PATH/glances.conf /etc/glances/glances.conf\n chown root:root /etc/monit/monitrc\n chmod 700 /etc/monit/monitrc\n service monit restart\n /usr/local/bin/glances -w &'
sed -i -e "/^[[:space:]]*#Start Debian Glances conf.*/a${glancesDockerSection}" $GLOBAL_MONITOR_SCRIPT_FILE
fi
