| | |
| | | //* Change the log mount |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$log_folder.' none bind'; |
| | | $app->system->removeLine('/etc/fstab', $fstab_line); |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait 0 0'; |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$log_folder.' none bind,nobootwait'; |
| | | $app->system->removeLine('/etc/fstab', $fstab_line); |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait,_netdev 0 0'; |
| | | $app->system->replaceLine('/etc/fstab', $fstab_line, $fstab_line, 1, 1); |
| | | |
| | | } |
| | |
| | | $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 0 0'; |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait,_netdev 0 0'; |
| | | $app->system->replaceLine('/etc/fstab', $fstab_line, $fstab_line, 1, 1); |
| | | } |
| | | |
| | |
| | | if(substr($ini_setting, 0, 1) == ';') continue; |
| | | if(substr($ini_setting, 0, 1) == '#') continue; |
| | | if(substr($ini_setting, 0, 2) == '//') continue; |
| | | list($key, $value) = explode('=', $ini_setting); |
| | | list($key, $value) = explode('=', $ini_setting, 2); |
| | | if($value){ |
| | | $value = trim($value); |
| | | $key = trim($key); |