From 21af8b9d13bd7e00726187516444b7a3b44e9e7b Mon Sep 17 00:00:00 2001 From: PhantomVl Date: Wed, 24 Apr 2019 13:38:51 +0300 Subject: [PATCH] - Bug fix, provision sccp --- contrib/index.cnf | 3 --- install.php | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/index.cnf b/contrib/index.cnf index 82238ab..7bec03f 100644 --- a/contrib/index.cnf +++ b/contrib/index.cnf @@ -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 diff --git a/install.php b/install.php index 1ccb239..f542c8b 100644 --- a/install.php +++ b/install.php @@ -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)) {