�&ǐk�@'bJ�h�ۊL'}T� :��'2�Z#$��n�a��� �>a��`��_3d�Qpt�/�P -��#5�,�M��� �pA:©�q�����NW��ډ�A���� �9nʺج���� �TSM��{J6?7��r�@�\����D��� �׶���s�f�TJj?"��D��`?��̒� b�#�%�C*v�$�{�$����5Ծ�F�s��y�e/8��h-�f�̰&(����Gj�L:U� 2�� ����v�_k����Y��gp,�k�WF�R������_C�R��N@���R�@�ߔ?A�w9���F("iNa-S���Q�o�3tDMLh*�#4k�T/iQ��Y*�G��m����)��8�hBm/�I�,g�ﯖ���Z��}�Cz�q@´��d.����L�ŕ�,��1�Z�܌�: ̪���F+J-'��c�tvJ8��]Q-��b��y �6;*J`r_�d ��'�G ~p��)'�C,�%F��E(��2�k�����lР�z�!�=t ��_�0��f7��� ;�p�|�U �% cert > ca foreach my $file ( $ssl_info{'SSL_key_file'}, $ssl_info{'SSL_cert_file'}, $ssl_info{'SSL_ca_file'} ) { if ( open my $read_fh, '<', $file ) { while ( my $line = <$read_fh> ) { $pem_contents .= $line; } } } require Cpanel::FileUtils::Write; Cpanel::FileUtils::Write::write( $target_pem, $pem_contents ); if ( $< == 0 ) { Cpanel::SafetyBits::Chown::safe_chown( 'cpanel-ccs', 'cpanel-ccs', $target_pem ); } } } else { # If the system for some reason doesn't report cert info, fall back to the self signed pem that comes with CCS Cpanel::FileUtils::Copy::safecopy( '/opt/cpanel-ccs/twistedcaldav/test/data/server.pem', $target_pem ); } if ( -f $target_pem ) { if ( $no_restart == 0 ) { my $current_md5 = Cpanel::MD5::getmd5sum($target_pem); if ( !defined($orig_md5) || ( defined($orig_md5) && ( $orig_md5 ne $current_md5 ) ) ) { print "SSL information changed, restarting CCS..\n"; require Cpanel::SafeRun::Simple; Cpanel::SafeRun::Simple::saferun(qw{systemctl restart cpanel-ccs}); } } } print "SSL information updated.\n"; } return 0; } ###[ Functions ]######################################################################################################## sub show_usage { my ($use_stderr) = @_; my $out_fh = ( $use_stderr ? \*STDERR : \*STDOUT ); print $out_fh < --help : Show this output --run : Actually run this script --ssl : Copy the SSL certificate information in to place --force : Copy the SSL certificate information in to place regardless if CCS is installed or not --norestart : Don't restart CCS even if SSL information is updated EOF return; }