File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ public function backup_action($action_name, $data) {
7272 $ backup_dir = $ server_config ['backup_dir ' ].'/web ' .$ web ['domain_id ' ];
7373
7474 //* mount backup directory, if necessary
75+ /*
7576 $backup_dir_is_ready = true;
7677 $server_config['backup_dir_mount_cmd'] = trim($server_config['backup_dir_mount_cmd']);
7778 if($server_config['backup_dir_is_mount'] == 'y' && $server_config['backup_dir_mount_cmd'] != ''){
@@ -80,6 +81,19 @@ public function backup_action($action_name, $data) {
8081 sleep(1);
8182 if(!$app->system->is_mounted($server_config['backup_dir'])) $backup_dir_is_ready = false;
8283 }
84+ }*/
85+ $ backup_dir_is_ready = true ;
86+ $ backup_dir_mount_cmd = '/usr/local/ispconfig/server/scripts/backup_dir_mount.sh ' ;
87+ if ( $ server_config ['backup_dir_is_mount ' ] == 'y ' &&
88+ is_file ($ backup_dir_mount_cmd ) &&
89+ is_executable ($ backup_dir_mount_cmd ) &&
90+ fileowner ($ backup_dir_mount_cmd ) === 0
91+ ){
92+ if (!$ app ->system ->is_mounted ($ backup_dir )){
93+ exec ($ backup_dir_mount_cmd );
94+ sleep (1 );
95+ if (!$ app ->system ->is_mounted ($ server_config ['backup_dir ' ])) $ backup_dir_is_ready = false ;
96+ }
8397 }
8498
8599 if ($ backup_dir_is_ready ){
You can’t perform that action at this time.
0 commit comments