Newer
Older
backup-commander / install / install.php
<?php

if(!file_exists("conf.php")) {
	echo ">>> NOTE:\n>>> The file conf.php must be edited specifically for this system\n";
	echo ">>> The default file has been created for you.\n>>> Please edit the file to match your system\n";	
	copy( "conf-sample.php", "conf.php" );
	exit;
}

include "conf.php";

if(!isset($path_website)){
	echo ">>> ERROR:\n";
	echo "The path to the website must be set. Please edit/correct conf.php\n";
	exit;
}

if(!isset($path_project)){
	echo ">>> ERROR:\n";
	echo "The path to the projectmust be set. Please edit/correct conf.php\n";
	exit;
}

if(!file_exists( "$path_website/data" )) {
	// create the data directory
	mkdir( "$path_website/data" );
}

if(!file_exists( "$path_website/data/data.db" )) {
	// copy over the empty database
	copy( "$path_project/install/db/data.db", "$path_website/data/data.db" );
}


?>