Commit ab5875e8 authored by Mathias Ettinger's avatar Mathias Ettinger

Removed receiving logs on the manager if no collector was configured

parent cc3bb7db
......@@ -275,12 +275,6 @@ class MachineController:
tuntap_iface, instance_param,
CONF_DESTINATION_PATH)
command_line += " -f '/var/log/opensand/'"
try:
address, port = remote_address
except ValueError:
pass
else:
command_line += ' -r %s -l %d -s %d' % (address, port, port)
try:
start_ini.add_section(self._machine_model.get_component())
start_ini.set(self._machine_model.get_component(), 'command',
......
......@@ -29,12 +29,10 @@ update_start_cmd() {
COLLECTOR_STATS_PORT="${RET}"
db_get opensand-manager/collector/logs/port
COLLECTOR_LOGS_PORT="${RET}"
# Update stat command, indent adding espace
START_CMD=" command_line += \" -f '/var/log/opensand/' -r ${COLLECTOR_IP} -l ${COLLECTOR_LOGS_PORT} -s ${COLLECTOR_STATS_PORT}\""
# Comment lines 278-283
sed -e '278,283s/^#*/#/g' -i ${SOURCE_FILE}
# Update stat command
START_CMD="command_line += \" -f '/var/log/opensand/' -r ${COLLECTOR_IP} -l ${COLLECTOR_LOGS_PORT} -s ${COLLECTOR_STATS_PORT}\""
# Replace line 277 by start_cmd
sed -i "277s|^.*$|${START_CMD}|" ${SOURCE_FILE}
sed -i "277c\ ${START_CMD}" ${SOURCE_FILE}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment