Commit 522ba380 authored by Franco Fichtner's avatar Franco Fichtner

config: log_error() is not yet defined

parent 46da14a3
......@@ -67,12 +67,12 @@ function parse_config()
$backups = $cnf->getBackups();
if (count($backups) > 0) {
// load last backup
log_error(gettext("No (valid) config.xml found, attempting last known config restore."));
syslog(LOG_ERR, sprintf('parse_config(): %s', gettext('No (valid) config.xml found, attempting last known config restore.')));
file_notice("config.xml", gettext("No (valid) config.xml found, attempting last known config restore."), "OPNsenseConfigurator", "");
$cnf->restoreBackup($backups[0]);
} else {
// we don't have backups, try to load the default
log_error(gettext('No config.xml found, attempting to restore factory config.'));
syslog(LOG_ERR, sprintf('parse_config(): %s', gettext('No config.xml found, attempting to restore factory config.')));
$cnf->restoreBackup('/usr/local/etc/config.xml');
}
}
......
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