Commit 39a2d33c authored by Marius Cramer's avatar Marius Cramer

Merge branch 'master' into 'master'

Master

See merge request !171
parents 9d4bb867 ec4f1bad
......@@ -314,6 +314,8 @@ class cronjob_backup extends cronjob {
}
}
}
//* end run_backups
if( $server_config['backup_dir_is_mount'] == 'y' ) $app->system->umount_backup_dir($backup_dir);
} else {
//* send email to admin that backup directory could not be mounted
$global_config = $app->getconf->get_global_config('mail');
......
......@@ -181,7 +181,8 @@ class cronjob_backup_mail extends cronjob {
}
}
}
}
if( $server_config['backup_dir_is_mount'] == 'y' ) $app->system->umount_backup_dir($backup_dir);
} //* end run_backups
}
parent::onRunJob();
......
......@@ -1808,7 +1808,7 @@ class system{
fileowner($mount_cmd) === 0
) {
if (!$this->is_mounted($backup_dir)){
exec($backup_dir_mount_cmd);
exec($mount_cmd);
sleep(1);
if (!$this->is_mounted($backup_dir)) $mounted = false;
}
......@@ -1816,7 +1816,21 @@ class system{
return $mounted;
}
function umount_backup_dir($backup_dir, $mount_cmd = '/usr/local/ispconfig/server/scripts/backup_dir_umount.sh'){
if ( is_file($mount_cmd) &&
is_executable($mount_cmd) &&
fileowner($mount_cmd) === 0
) {
if ($this->is_mounted($backup_dir)){
exec($mount_cmd);
sleep(1);
}
}
return $this->is_mounted($backup_dir) == 0 ? true : false;
}
function getinitcommand($servicename, $action, $init_script_directory = ''){
global $conf;
// upstart
......
......@@ -405,7 +405,7 @@ class mail_plugin_dkim {
}
/* resync */
if ($data['new']['active'] == 'y' && $data['new'] == $data['old']) {
if ($data['new']['active'] == 'y' && $data['new'] == $data['old'] && $data['new']['dkim']=='y') {
$this->add_dkim($data);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment