Fixed: FS#3705 - openvz container wont boot after new mounts added to fstab
-Added a new option "Network Filesystem" under System > Server config > Web to toggle on / off the _netdev option for the bind mounts in /etc/fstab
| | |
| | | website_path=/var/www/clients/client[client_id]/web[website_id] |
| | | website_symlinks=/var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/ |
| | | website_symlinks_rel=n |
| | | network_filesystem=n |
| | | vhost_conf_dir=/etc/apache2/sites-available |
| | | vhost_conf_enabled_dir=/etc/apache2/sites-enabled |
| | | nginx_vhost_conf_dir=/etc/nginx/sites-available |
| | |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'network_filesystem' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'website_autoalias' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | | |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Netzwerk-Dateisystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Neispravan cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Neispravan crontab direktorij.'; |
| | | $wb['cron_wget_error_regex'] = 'Neispravna cron wget putanja.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | | |
| | | |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | ?> |
| | |
| | | {tmpl_var name='website_symlinks_rel'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="website_symlinks_rel">{tmpl_var name='network_filesystem_txt'}</label> |
| | | <div class="multiField"> |
| | | {tmpl_var name='network_filesystem'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="website_autoalias">{tmpl_var name='website_autoalias_txt'}</label> |
| | | <input name="website_autoalias" id="website_autoalias" value="{tmpl_var name='website_autoalias'}" size="40" maxlength="255" type="text" class="textInput" /> {tmpl_var name='website_autoalias_note_txt'} <a href="javascript:void(0);" class="addPlaceholder">[client_id]</a>, <a href="javascript:void(0);" class="addPlaceholder">[client_username]</a>, <a href="javascript:void(0);" class="addPlaceholder">[website_id]</a>, <a href="javascript:void(0);" class="addPlaceholder">[website_domain]</a> |
| | |
| | | if($apache_chrooted) $this->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' '.$command); |
| | | |
| | | //* Change the log mount |
| | | /* |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_log_folder.' none bind'; |
| | | $app->system->removeLine('/etc/fstab', $fstab_line); |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_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); |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_log_folder.' none bind,nobootwait'; |
| | | $app->system->removeLine('/etc/fstab', $fstab_line); |
| | | */ |
| | | |
| | | $fstab_line_old = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_log_folder.' none bind'; |
| | | |
| | | if($web_config['network_filesystem'] == 'y') { |
| | | $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_old, $fstab_line, 0, 1); |
| | | } else { |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait 0 0'; |
| | | $app->system->replaceLine('/etc/fstab', $fstab_line_old, $fstab_line, 0, 1); |
| | | } |
| | | |
| | | exec('mount --bind '.escapeshellarg('/var/log/ispconfig/httpd/'.$data['new']['domain']).' '.escapeshellarg($data['new']['document_root'].'/'.$log_folder)); |
| | | |
| | | |
| | | } |
| | | |
| | | //print_r($data); |
| | |
| | | if($nginx_chrooted) $this->_exec('chroot '.escapeshellcmd($web_config['website_basedir']).' '.$command); |
| | | |
| | | //* Change the log mount |
| | | /* |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_log_folder.' none bind'; |
| | | $app->system->removeLine('/etc/fstab', $fstab_line); |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_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); |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_log_folder.' none bind,nobootwait'; |
| | | $app->system->removeLine('/etc/fstab', $fstab_line); |
| | | */ |
| | | |
| | | $fstab_line_old = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$old_log_folder.' none bind'; |
| | | |
| | | if($web_config['network_filesystem'] == 'y') { |
| | | $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_old, $fstab_line, 0, 1); |
| | | } else { |
| | | $fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait 0 0'; |
| | | $app->system->replaceLine('/etc/fstab', $fstab_line_old, $fstab_line, 0, 1); |
| | | } |
| | | |
| | | exec('mount --bind '.escapeshellarg('/var/log/ispconfig/httpd/'.$data['new']['domain']).' '.escapeshellarg($data['new']['document_root'].'/'.$log_folder)); |
| | | |