- Installation procedure, detect chan_sccp
This commit is contained in:
parent
83ec52ea56
commit
06031ad89c
14
install.php
14
install.php
|
@ -805,12 +805,12 @@ function CreateBackUpConfig() {
|
||||||
global $amp_conf;
|
global $amp_conf;
|
||||||
outn("<li>" . _("Create Config BackUp") . "</li>");
|
outn("<li>" . _("Create Config BackUp") . "</li>");
|
||||||
$cnf_int = \FreePBX::Config();
|
$cnf_int = \FreePBX::Config();
|
||||||
$backup_files = array('extconfig','extconfig','res_mysql', 'res_config_mysql','sccp');
|
$backup_files = array('extensions','extconfig','res_mysql', 'res_config_mysql','sccp');
|
||||||
$backup_ext = array('_custom.conf', '.conf');
|
$backup_ext = array('_custom.conf', '.conf');
|
||||||
$dir = $cnf_int->get('ASTETCDIR');
|
$dir = $cnf_int->get('ASTETCDIR');
|
||||||
|
|
||||||
$filename = $dir.'/sccp_backup_'.date("Ymd").'.sql';
|
$fsql = $dir.'/sccp_backup_'.date("Ymd").'.sql';
|
||||||
$result = exec('mysqldump '.$amp_conf['AMPDBNAME'].' --password='.$amp_conf['AMPDBPASS'].' --user='.$amp_conf['AMPDBUSER'].' --single-transaction >'.$filename ,$output);
|
$result = exec('mysqldump '.$amp_conf['AMPDBNAME'].' --password='.$amp_conf['AMPDBPASS'].' --user='.$amp_conf['AMPDBUSER'].' --single-transaction >'.$fsql ,$output);
|
||||||
|
|
||||||
$zip = new \ZipArchive();
|
$zip = new \ZipArchive();
|
||||||
$filename = $dir . "/sccp_instal_backup" . date("Ymd"). ".zip";
|
$filename = $dir . "/sccp_instal_backup" . date("Ymd"). ".zip";
|
||||||
|
@ -822,10 +822,14 @@ function CreateBackUpConfig() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (file_exists($fsql)) {
|
||||||
|
$zip->addFile($fsql);
|
||||||
|
}
|
||||||
$zip->close();
|
$zip->close();
|
||||||
} else {
|
} else {
|
||||||
outn("<li>" . _("Error Create BackUp: ") . $filename ."</li>");
|
outn("<li>" . _("Error Create BackUp: ") . $filename ."</li>");
|
||||||
}
|
}
|
||||||
|
unlink($fsql);
|
||||||
outn("<li>" . _("Create Config BackUp: ") . $filename ."</li>");
|
outn("<li>" . _("Create Config BackUp: ") . $filename ."</li>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -919,9 +923,11 @@ $sccp_db_ver = CheckSCCPManagerDBVersion();
|
||||||
|
|
||||||
// BackUp Old config
|
// BackUp Old config
|
||||||
CreateBackUpConfig();
|
CreateBackUpConfig();
|
||||||
|
if ($sccp_compatible > 431) {
|
||||||
InstallDB_sccpuser();
|
InstallDB_sccpuser();
|
||||||
InstallDB_Buttons();
|
InstallDB_Buttons();
|
||||||
|
}
|
||||||
|
|
||||||
InstallDB_sccpsettings();
|
InstallDB_sccpsettings();
|
||||||
InstallDB_sccpdevmodel();
|
InstallDB_sccpdevmodel();
|
||||||
InstallDB_updateSchema($db_config);
|
InstallDB_updateSchema($db_config);
|
||||||
|
|
Loading…
Reference in a new issue