Diseño 141 – perfil VideoChat Chaturbate ya creado
Diseño simple y bien estructurado sobre un fondo blanco. Si te gustan los gatitos, esta puede ser tu eleccion de perfil para tu biografia. Ver Demo Las instrucciones con imagenes…
%PDF- %PDF-
| Direktori : /scripts/ |
| Current File : //scripts/fixtlsversions |
#!/usr/local/cpanel/3rdparty/bin/perl
# cpanel - scripts/fixtlsversions Copyright 2022 cPanel, L.L.C.
# All rights reserved.
# copyright@cpanel.net http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited
package scripts::fixtlsversions;
# This script is related to CPANEL-33512 and is expected to be
# of limited usefulness outside of the one-time task to ensure
# that TLSv1.2 is active for cpsrvd and other services.
use strict;
use warnings;
use Cpanel::LoadModule ();
use Cpanel::SSL::Protocols ();
use Cpanel::ServerTasks ();
use Cpanel::Imports;
use Getopt::Long 'GetOptionsFromArray';
exit run(@ARGV) unless caller;
sub run {
my @args = @_;
my ( $help, $dry_run, $update );
GetOptionsFromArray(
\@args,
'help' => \$help,
'dry-run' => \$dry_run,
'update' => \$update,
) || return _usage(1);
return _usage(0) if $help;
return _usage(1) unless $dry_run xor $update;
my $obj = __PACKAGE__->new( update => $update );
$obj->logmsg('Ensuring that web-accessible services have TLSv1.2 active …');
for my $try ( 1, 2 ) {
$obj->adjust_cpsrvd_and_cpdavd();
$obj->adjust_apache();
if ( $obj->{failed} ) {
$obj->logmsg( sprintf( '%d error(s) occurred.', $obj->{failed} ) );
if ( $try == 1 ) {
$obj->logmsg('Trying again …');
delete $obj->{failed};
sleep 2;
}
}
else {
$obj->logmsg('Done.');
last;
}
}
return $obj->{failed} ? 1 : 0;
}
sub new {
my ( $package, %opts ) = @_;
return bless {%opts}, $package;
}
sub adjust_cpsrvd_and_cpdavd {
my ($self) = @_;
for my $service (qw(cpsrvd cpdavd)) {
my $module = "Cpanel::ServiceConfig::$service";
Cpanel::LoadModule::load_perl_module($module);
my $conf_obj = $module->new();
my $settings_hr = $conf_obj->get_config(1);
my $old_string = $settings_hr->{SSLVersion};
my $new_string = Cpanel::SSL::Protocols::upgrade_version_string_for_tls_1_2( $settings_hr->{SSLVersion}, '_' );
$settings_hr->{SSLVersion} = $new_string;
if ( $new_string ne $old_string ) {
if ( $self->{update} ) {
eval {
$conf_obj->validate($settings_hr) or die "Failed to validate configuration\n";
my ( $save_ok, $save_msg ) = $conf_obj->save_datastore($settings_hr);
$conf_obj->update_config($settings_hr);
Cpanel::ServerTasks::queue_task( ['CpServicesTasks'], "restartsrv $service" );
};
if ( my $exception = $@ ) {
$self->logmsg("'$service' failed to update TLS protocols: $exception");
++$self->{failed};
}
else {
$self->logmsg("'$service' switched $old_string to $new_string");
}
}
}
else {
$self->logmsg("'$service' left $old_string unchanged");
}
}
return;
}
sub adjust_apache {
my ($self) = @_;
require Cpanel::EA4::Conf;
my $conf = Cpanel::EA4::Conf->instance();
my $old_string = $conf->sslprotocol;
my $new_string = Cpanel::SSL::Protocols::upgrade_version_string_for_tls_1_2_apache($old_string);
my $current = $conf->sslprotocol($new_string);
if ( $new_string ne $old_string ) {
if ( $self->{update} ) {
eval {
$conf->save;
Cpanel::ServerTasks::queue_task( ['ApacheTasks'], 'build_apache_conf' );
};
if ( my $exception = $@ ) {
$self->logmsg("'httpd' failed to update TLS protocols: $exception");
++$self->{failed};
# rebuild conf but save restart for the next time it's necessary
}
else {
$self->logmsg("'httpd' switched $old_string to $new_string");
}
}
}
else {
$self->logmsg("'httpd' left $old_string unchanged");
}
return;
}
sub logmsg {
my ( $self, $msg ) = @_;
return logger()->info( sprintf( '%s%s', $self->{update} ? '' : '(dry run) ', $msg ) );
}
sub _usage {
my ($error) = @_;
my $usage = <<EOU;
usage: $0 --dry-run | --update
You must specify one or the other, and you may not specify both.
--dry-run: Do everything (including log messages) except make the actual changes
--update: Make the changes
EOU
if ($error) {
print STDERR $usage;
return 1;
}
print $usage;
return 0;
}
Diseño simple y bien estructurado sobre un fondo blanco. Si te gustan los gatitos, esta puede ser tu eleccion de perfil para tu biografia. Ver Demo Las instrucciones con imagenes…
Un diseño pensado para usarlo en las fiestas de navidad. Lo podemos personalizar, poniendo tu foto de fondo y asi darle un toque totalmente personal. Ver Demo Las instrucciones con…
Feliz año nuevo - empieza el nuevo año deseando y deseandote todo lo mejor. Puedes usar este diseño en los primeros dias del año, para recrear la atmosfera fertiva que…
Si eres amante de las motos y la montaña, puedes usar este diseño en tu perfil. Concebido en especial para chicos. Lo podemos personalizar para ti, si nos envias un…
Un diseño maravilloso para tu pagina en chaturbate. El diseño esta enfocado en el periodo invernal y lo puedes usar tranquilamente al menos en los meses de diciembre y enero.…
No siempre la navidad debe ser brillante, sobre todo si no se adapta a tu forma de ser. Si consideras que tienes un lado gotico, algo oscuro y quieres quieres…
A casi todos nos gustan los gatos, pero este gato es especial, ya que hace yoga para calmar sus instintos felinos. Es probable que si eres una persona flexible, calma…
Las fiestas de navidad, son una buena oportunidad para lucirte en tu show online. Hazlo con un perfil divertido, muy bien estructurado y un diseño claro. Ver Demo Las instrucciones…
Bonito, elegante, lujo, son solo algunas de las palabras que podrian definir este diseño. Recomendado para las personas que desean dar un aspecto mas elegante a su sala de chat.…
Esqueletos, calabazas y arañas, abrazadas por el fuego desatado en la unica noche del año cuando el velo entre los vivos y los muertos, es tan fino que casi se…