4:41 #ˆl–Ðz¾” Jj"TÒ�zàœ¸”Å£À 433¿Ã±#!/usr/local/cpanel/3rdparty/bin/perl # cpanel - scripts/killmysqluserprivs 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 use strict; exec '/usr/local/cpanel/bin/killmysqluserprivs', @ARGV; :ˆl–ß=¿J µ2ÛR‚œP-\lò˜´oÁ ƒq¶CÀa–ß=¿JJj"Tâ‚fà›¸Å£Äƒa '¡Dgà*ã@s8UdZddlZddlZddlZddlmZddlmZddlm Z m Z ddl Z ddl m Z mZmZmZmZddlmZddlmZdd lmZdd lmZmZmZdd lmZd Zd gZdZ degedgdœZ!ee"d<e #e$¡Z%Gdd„dƒZ&ee'dœdd„Z(dd„Z)edddfedœdd„Z*e'eee+ddœdd „Z,dS)!z+Puppet: Install, configure and start puppetéN)Úsuppress)ÚStringIO)ÚListÚUnion)ÚhelpersÚsubpÚ temp_utilsÚ url_helperÚutil)ÚCloud)ÚConfig)Ú MetaSchema)Ú ALL_DISTROSÚDistroÚPackageInstallerError)Ú PER_INSTANCEzKhttps://raw.githubusercontent.com/puppetlabs/install-puppet/main/install.shz--test)ú puppet-agentÚpuppetZ cc_puppetr)ÚidZdistrosZ frequencyZactivate_by_schema_keysÚmetac@seZdZdd„ZdS)ÚPuppetConstantscCs8||_||_tj |d¡|_tj |jd¡|_||_dS)NZcertszca.pem)Ú conf_pathÚssl_dirÚosÚpathÚjoinÚ ssl_cert_dirÚ ssl_cert_pathÚcsr_attributes_path)ÚselfZpuppet_conf_fileZpuppet_ssl_dirr©r ú>/usr/lib/python3.9/site-packages/cloudinit/config/cc_puppet.pyÚ__init__*s zPuppetConstants.__init__N)Ú__name__Ú __module__Ú __qualname__r"r r r r!r)sr)ÚcloudÚactionc Csbd}tD]<}z"|j ||›d�¡|}WqFWqtjyBYq0q|s^t d|d t¡¡dS)z8Attempts to perform action on one of the puppet servicesÚz.servicez0Could not '%s' any of the following services: %sú, N)ÚPUPPET_PACKAGE_NAMESÚdistroZmanage_servicerZProcessExecutionErrorÚLOGÚwarningr)r&r'Zservice_managedÚ puppet_namer r r!Ú_manage_puppet_services7s ýr/cCst |dd|g¡\}}| ¡S)z›Get the config value for a given setting using `puppet config print` :param puppet_bin: path to puppet binary :param setting: setting to query ÚconfigÚprint)rÚrstrip)Ú puppet_binZsettingÚoutÚ_r r r!Úget_config_valueIsr6T)r+c Cs®g}|durd|g}|dur(|d|g7}|r6|dg7}tj|dd�j}tj| ¡dd��B}tj |d ¡}t j ||d d �t j |g|d d �WdƒS1s 0YdS)a—Install puppet-agent from the puppetlabs repositories using the one-shot shell script :param distro: Instance of Distro :param url: URL from where to download the install script :param version: version to install, blank defaults to latest :param collection: collection to install, blank defaults to latest :param cleanup: whether to purge the puppetlabs repo after installation Nz-vz-cz --cleanupé)ÚurlZretriesT)ÚdirZ needs_exezpuppet-installiÀ)ÚmodeF©Zcapture) r ZreadurlÚcontentsrZtempdirZget_tmp_exec_pathrrrr Ú write_filer) r+r8ÚversionÚ collectionÚcleanupÚargsZcontentZtmpdZtmpfr r r!Úinstall_puppet_aioRs  ÿrB)ÚnameÚcfgr&rAÚreturnc CsRd|vrt d|¡dS|d}t |dd¡}t |dd¡}t |dd¡}t |dd¡}t |d d¡} tj|d d d �} tj|d dd �} tj|dtd �} |dkr¬d} d}d}n d} d}d}t |d|¡}|sÜ|rÜt d¡�n |�ræt d|rð|nd|¡|dk�r¸|du�r”tD]h}tt ƒ�H|�r.||ggn|g}|j   |¡|}Wdƒ�qzWdƒn1�sl0Y�q|�