PNG  IHDR* pHYs+ IDATx]n#; cdLb Ǚ[at¤_:uP}>!Usă cag޿ ֵNu`ݼTâabO7uL&y^wFٝA"l[|ŲHLN밪4*sG3|Dv}?+y߉{OuOAt4Jj.u]Gz*҉sP'VQKbA1u\`& Af;HWj hsO;ogTu uj7S3/QzUr&wS`M$X_L7r2;aE+ώ%vikDA:dR+%KzƉo>eOth$z%: :{WwaQ:wz%4foɹE[9<]#ERINƻv溂E%P1i01 |Jvҗ&{b?9g=^wζXn/lK::90KwrюO\!ջ3uzuGv^;騢wq<Iatv09:tt~hEG`v;3@MNZD.1]L:{ծI3`L(÷ba")Y.iljCɄae#I"1 `3*Bdz>j<fU40⨬%O$3cGt]j%Fߠ_twJ;ABU8vP3uEԑwQ V:h%))LfraqX-ۿX]v-\9I gl8tzX ]ecm)-cgʒ#Uw=Wlێn(0hPP/ӨtQ“&J35 $=]r1{tLuǮ*i0_;NƝ8;-vݏr8+U-kruȕYr0RnC]*ެ(M:]gE;{]tg(#ZJ9y>utRDRMdr9㪩̞zֹb<ģ&wzJM"iI( .ꮅX)Qw:9,i좜\Ԛi7&N0:asϓc];=ΗOӣ APqz93 y $)A*kVHZwBƺnWNaby>XMN*45~ղM6Nvm;A=jֲ.~1}(9`KJ/V F9[=`~[;sRuk]rєT!)iQO)Y$V ی ۤmzWz5IM Zb )ˆC`6 rRa}qNmUfDsWuˤV{ Pݝ'=Kֳbg,UҘVz2ﴻnjNgBb{? ߮tcsͻQuxVCIY۠:(V뺕 ٥2;t`@Fo{Z9`;]wMzU~%UA蛚dI vGq\r82iu +St`cR.6U/M9IENDB`#!/usr/local/cpanel/3rdparty/bin/perl # cpanel - scripts/cleanupinterchange 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::cleanupinterchange; use strict; use warnings; use Cpanel::FileUtils::Lines (); use Cpanel::FileUtils::Modify (); use Cpanel::ServerTasks (); use Getopt::Long; use Pod::Usage; use Try::Tiny; our $INTERCHANGE_FILE = '/etc/chkserv.d/interchange'; our $INTERCHANGE_RESTART_FILE = '/var/run/chkservd/restart_track/interchange'; our $CHKSERVD_CONF_FILE = '/etc/chkserv.d/chkservd.conf'; sub new { my $pkg = shift; my $self = {}; bless $self, $pkg; return $self; } sub as_script { my $self = shift; my $execute = 0; my $help = 0; Getopt::Long::GetOptions( 'x' => \$execute, 'help' => \$help, ); if ($help) { Pod::Usage::pod2usage( -verbose => 2, -exitval => 1, ); } if ( not $execute ) { my $msg = qq{To execute, use the -x flag.}; die($msg); } $self->run(); return 1; } sub run { my $self = shift; my $restart_tailwatchd; if ( -e $INTERCHANGE_FILE ) { unlink($INTERCHANGE_FILE); ++$restart_tailwatchd; } if ( -e $INTERCHANGE_RESTART_FILE ) { unlink($INTERCHANGE_RESTART_FILE); } if ( -e $CHKSERVD_CONF_FILE ) { if ( Cpanel::FileUtils::Lines::has_txt_in_file( $CHKSERVD_CONF_FILE, 'interchange' ) ) { Cpanel::FileUtils::Modify::remlinefile( $CHKSERVD_CONF_FILE, 'interchange:', 'begin' ); ++$restart_tailwatchd; } } if ($restart_tailwatchd) { local $@; try { Cpanel::ServerTasks::queue_task( ['TailwatchTasks'], 'reloadtailwatch' ); } catch { warn "There was an error restarting tailwatchd: $_"; }; } return 0; } if ( not caller() ) { my $cleanup = scripts::cleanupinterchange->new(); $cleanup->as_script; exit 0; } 1; __END__ =head1 NAME cleanupinterchange - cleans up cruft left over from the interchange removal =head1 SYNOPSIS cleanup_interchange [options] Options: -help print help message -x execute the change =head1 DESCRIPTION In cPanel & WHM version 11.34, we removed Interchange, but small remnants were left behind. This script cleans up that clutter. If the remnants have already been removed, this script does nothing. =cut