????
Current Path : /proc/335989/root/proc/328294/root/scripts/ |
Current File : //proc/335989/root/proc/328294/root/scripts/remdefssl |
#!/usr/local/cpanel/3rdparty/bin/perl # cpanel - remdefssl Copyright 2010 cPanel, Inc. # All rights Reserved. # copyright@cpanel.net http://cpanel.net # This code is subject to the cPanel license. Unauthorized copying is prohibited use strict; ## no critic qw(TestingAndDebugging::RequireUseWarnings) use Cpanel::EditHttpdconf (); use Cpanel::Config::Httpd::EA4 (); if ( Cpanel::Config::Httpd::EA4::is_ea4() ) { print "$0 N/A on ea4\n"; exit(0); } Cpanel::EditHttpdconf::edit_httpdconf( sub { my ( $rw_fh, $safe_replace_content_coderef ) = @_; my @new_content; my $indefssl_vhost = 0; while ( my $line = readline($rw_fh) ) { $indefssl_vhost = 1 if $line =~ m{VirtualHost\s+["]?_default_:443["]?}i; push @new_content, $line if !$indefssl_vhost; $indefssl_vhost = 0 if $indefssl_vhost && $line =~ m{\s*[<][/]VirtualHost[>]}i; } return "Edited by $0 " if $safe_replace_content_coderef->( $rw_fh, \@new_content ); return; } ); system '/usr/local/cpanel/scripts/initsslhttpd';