Server IP : 162.240.98.243 / Your IP : 3.145.89.134 Web Server : Apache System : Linux server.bti.yaw.mybluehostin.me 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : btiyawmy ( 1003) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /scripts/ |
Upload File : |
#!/usr/local/cpanel/3rdparty/bin/perl # cpanel - scripts/regenerate_tokens 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::regenerate_tokens; use strict; use warnings; use Cpanel::Imports; use Cpanel::Hyperscaler::Regenerate (); exit run(@ARGV) unless caller; sub run { my (@args) = @_; my ( $exit_code, $force ) = _handle_args( \@args ); return $exit_code if defined $exit_code; if ( !Cpanel::Hyperscaler::Regenerate::is_cloud() ) { logger()->info('This system does not appear to be a cloud instance.'); return 0; } return ( Cpanel::Hyperscaler::Regenerate::regenerate_tokens($force) ? 0 : 1 ); } sub _handle_args { my ($args) = @_; if ( @$args == 1 && $args->[0] eq '--help' ) { print _usage(); return 0; } elsif ( @$args == 1 && $args->[0] eq '--force' ) { return ( undef, 1 ); } elsif ( @$args > 0 ) { print STDERR "ERROR unknown option: $args->[0]\n\n"; print STDERR _usage(); return 1; } return undef; } sub _usage { return <<EOU; usage: $0 [--force] This script regenerates secret data on a virtual machine that is not handled properly by most virtual machine templating systems. flags: --force Rerun all cleanups regardless of whether they have run before. EOU } 1;