Commit c8679f3e authored by Florian Schaal's avatar Florian Schaal
Browse files

FS#4031 - Disabling server option "Network Filesystem" does not work

parent 576d93bb
......@@ -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);
}
......
......@@ -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);
}
......
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