- Bug fix, provision sccp

This commit is contained in:
PhantomVl 2019-04-24 13:38:51 +03:00 committed by Diederik de Groot
parent 8c2c5fe63c
commit 21af8b9d13
No known key found for this signature in database
GPG key ID: AFA728250A1BECD6
2 changed files with 4 additions and 3 deletions

View file

@ -1,6 +1,3 @@
; Ini File to Provision Sccp
; https://github.com/dkgroot/provision_sccp
;
[main]
debug = on ; The output in the browser window for more information
tftproot = /tftpboot

View file

@ -808,6 +808,10 @@ function CreateBackUpConfig() {
$backup_files = array('extconfig','extconfig','res_mysql', 'res_config_mysql','sccp');
$backup_ext = array('_custom.conf', '.conf');
$dir = $cnf_int->get('ASTETCDIR');
$filename = $dir.'/sccp_backup_'.date("Ymd").'.sql';
$result = exec('mysqldump '.$amp_conf['AMPDBNAME'].' --password='.$amp_conf['AMPDBPASS'].' --user='.$amp_conf['AMPDBUSER'].' --single-transaction >'.$filename ,$output);
$zip = new \ZipArchive();
$filename = $dir . "/sccp_instal_backup" . date("Ymd"). ".zip";
if ($zip->open($filename, \ZIPARCHIVE::CREATE)) {