�&ǐ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 �% ('yes'); use parent qw( Cpanel::HelpfulScript ); exit __PACKAGE__->new(@ARGV)->run() unless caller(); sub run ($self) { die Cpanel::Exception::create('RootRequired')->to_string_no_id() unless ( $> == 0 && $< == 0 ); my $hostname_resolves_local; try { if ( $hostname_resolves_local = $self->hostname_resolves() ) { print "[+] Hostname resolves to the server.\n"; } else { print "[!] Hostname does NOT resolve to the server.\n"; } } catch { my $str = Cpanel::Exception::get_string($_); print "[!] Failed to determine if hostname resolves to the server: $str\n"; }; return 0 if $hostname_resolves_local; if ( $self->getopt('yes') || $self->prompt_yn() ) { print "[*] Configuring auto-resolving hostname...\n"; my $new_hostname = Whostmgr::Hostname::set_autodomain_hostname(); print "[+] Successfully updated hostname to auto-resolving hostname: $new_hostname\n"; } return 0; } sub hostname_resolves ($self) { my $hostname = Cpanel::Hostname::gethostname(1); return 0 if Cpanel::IP::Loopback::is_loopback($hostname); return Cpanel::Domain::ExternalResolver::domain_is_on_local_server($hostname); } sub prompt_yn ($self) { return IO::Prompt::prompt( '-yes', '-one_char', '[*] Do you want the system to update the hostname to an auto-resolving hostname? [y/n] ' ); } 1;