Commit 80262299 authored by Till Brehm's avatar Till Brehm

Added backup mount script to backup plugin.

parent 6f03cca3
......@@ -72,6 +72,7 @@ class backup_plugin {
$backup_dir = $server_config['backup_dir'].'/web'.$web['domain_id'];
//* mount backup directory, if necessary
/*
$backup_dir_is_ready = true;
$server_config['backup_dir_mount_cmd'] = trim($server_config['backup_dir_mount_cmd']);
if($server_config['backup_dir_is_mount'] == 'y' && $server_config['backup_dir_mount_cmd'] != ''){
......@@ -80,6 +81,19 @@ class backup_plugin {
sleep(1);
if(!$app->system->is_mounted($server_config['backup_dir'])) $backup_dir_is_ready = false;
}
}*/
$backup_dir_is_ready = true;
$backup_dir_mount_cmd = '/usr/local/ispconfig/server/scripts/backup_dir_mount.sh';
if( $server_config['backup_dir_is_mount'] == 'y' &&
is_file($backup_dir_mount_cmd) &&
is_executable($backup_dir_mount_cmd) &&
fileowner($backup_dir_mount_cmd) === 0
){
if(!$app->system->is_mounted($backup_dir)){
exec($backup_dir_mount_cmd);
sleep(1);
if(!$app->system->is_mounted($server_config['backup_dir'])) $backup_dir_is_ready = false;
}
}
if($backup_dir_is_ready){
......
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