#!/usr/bin/env php $cur_rules) { $cur_rules = $new_rules; $rules = cache_syslog_rules(); $device_rules = cache_syslog_rules_assoc(); $maint = cache_alert_maintenance(); if ($config['syslog']['debug']) { logfile('debug.log', "Rules updated: " . $new_rules); } } // host || facility || priority || level || tag || timestamp || msg || program process_syslog($line, 1); unset($line); // Check if syslog config changed $config_changed = get_obs_attrib('syslog_config_changed'); // if ($config['syslog']['debug']) { // logfile('debug.log', "Syslog config time: " . $config_changed); // } if (!empty($config_changed) && ($config_changed > $config_unixtime)) { $config_unixtime = $config_changed; // if ($config['syslog']['debug']) { // //logfile('debug.log', "Syslog config changed: " . $config_changed); // logfile('debug_syslog.log', var_export($config['syslog']['filter'], TRUE)); // } // Reload config changed load_sqlconfig($config); if ($config['syslog']['debug']) { logfile('debug.log', "Syslog config changed: " . $config_changed); //logfile('debug_syslog.log', var_export($config['syslog']['filter'], TRUE)); } if (!$config['enable_syslog']) { // Disabled during update exit(0); } } // What is do this? :O $i++; if ($i > 10) { $i = 1; } } // EOF