diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 25147e46ea320bd8224ee614059ab3fc55fb8dc2..1b5a4c282ca133a4d0c1e822ab745a68d254077c 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -595,7 +595,7 @@ class apache2_plugin { //* Unmount the old log directory bfore we move the log dir //exec('fuser -km '.escapeshellcmd($old_dir.'/log')); - exec('umount '.escapeshellcmd($old_dir.'/log')); + exec('umount '.escapeshellcmd($data['old']['document_root'].'/log')); //* Create new base directory, if it does not exist yet if(!is_dir($new_dir)) $app->system->mkdirpath($new_dir); @@ -691,7 +691,8 @@ class apache2_plugin { $app->system->chmod($data['new']['document_root'].'/'.$log_folder, 0755); exec('mount --bind '.escapeshellarg('/var/log/ispconfig/httpd/'.$data['new']['domain']).' '.escapeshellarg($data['new']['document_root'].'/'.$log_folder)); //* add mountpoint to fstab - $fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait,_netdev 0 0'; + $fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait'; + $fstab_line .= @($web_config['network_filesystem'] == 'y')?',_netdev 0 0':' 0 0'; $app->system->replaceLine('/etc/fstab', $fstab_line, $fstab_line, 1, 1); } diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 7be49ce55606a9ac7086069fc9a89a2e914955c4..7bb4f8ca606096faafb9f257b32b5835a8387938 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -476,7 +476,7 @@ class nginx_plugin { //* Unmount the old log directory bfore we move the log dir //exec('fuser -km '.escapeshellcmd($old_dir.'/log')); - exec('umount '.escapeshellcmd($old_dir.'/log')); + exec('umount '.escapeshellcmd($data['old']['document_root'].'/log')); //* Create new base directory, if it does not exist yet if(!is_dir($new_dir)) $app->system->mkdirpath($new_dir); @@ -572,7 +572,8 @@ class nginx_plugin { $app->system->chmod($data['new']['document_root'].'/'.$log_folder, 0755); exec('mount --bind '.escapeshellarg('/var/log/ispconfig/httpd/'.$data['new']['domain']).' '.escapeshellarg($data['new']['document_root'].'/'.$log_folder)); //* add mountpoint to fstab - $fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait,_netdev 0 0'; + $fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait'; + $fstab_line .= @($web_config['network_filesystem'] == 'y')?',_netdev 0 0':' 0 0'; $app->system->replaceLine('/etc/fstab', $fstab_line, $fstab_line, 1, 1); }