Project

General

Profile

« Previous | Next » 

Revision 63cc5ece

Added by Scott Ullrich almost 19 years ago

If no config.xml is found, attempt restore from the latest backup.

View differences:

etc/inc/config.inc
218 218
			$config = parse_config(true);
219 219
		}
220 220
	} else {
221
		if(!file_exists($g['conf_path'] . "/config.xml")) {
222
			log_error(gettext("No config.xml found, attempting last known config restore."));
223
			$last_backup = discover_last_backup();
224
			if ($last_backup)
225
				restore_backup("/cf/conf/backup/{$last_backup}");
226
			else
227
				log_error(gettext("Could not restore config.xml."));
228
		}
221 229
		$config = parse_xml_config($g['conf_path'] . '/config.xml', $g['xml_rootobj']);
222 230
		generate_config_cache($config);
223 231
	}

Also available in: Unified diff