File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed
Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -178,23 +178,12 @@ public function backup_action_mail($action_name, $data) {
178178
179179 $ server_config = $ app ->getconf ->get_server_config ($ conf ['server_id ' ], 'server ' );
180180 $ backup_dir = $ server_config ['backup_dir ' ];
181+ $ backup_dir_is_ready = true ;
181182
182183 //* mount backup directory, if necessary
183- $ run_backups = true ;
184- $ backup_dir_mount_cmd = '/usr/local/ispconfig/server/scripts/backup_dir_mount.sh ' ;
185- if ( $ server_config ['backup_dir_is_mount ' ] == 'y ' &&
186- is_file ($ backup_dir_mount_cmd ) &&
187- is_executable ($ backup_dir_mount_cmd ) &&
188- fileowner ($ backup_dir_mount_cmd ) === 0
189- ){
190- if (!$ app ->system ->is_mounted ($ backup_dir )){
191- exec ($ backup_dir_mount_cmd );
192- sleep (1 );
193- if (!$ app ->system ->is_mounted ($ backup_dir )) $ run_backups = false ;
194- }
195- }
184+ if ( $ server_config ['backup_dir_is_mount ' ] == 'y ' && !$ app ->system ->mount_backup_dir ($ backup_dir ) ) $ backup_dir_is_ready = false ;
196185
197- if ($ run_backups ){
186+ if ($ backup_dir_is_ready ){
198187 $ mail_config = $ app ->getconf ->get_server_config ($ conf ['server_id ' ], 'mail ' );
199188 $ domain_rec = $ app ->db ->queryOneRecord ("SELECT * FROM mail_domain WHERE domain_id = " .intval ($ mail_backup ['parent_domain_id ' ]));
200189
You can’t perform that action at this time.
0 commit comments