Edit: /opt/alt/alt-php-config/multiphp_reconfigure.pyc (8350B)
Ñò
ˆz]hc @ s0 d d k Z d d k Z d d k Z d d k Z d d k Z d d k Z y d d k Z Wn e j
o d d k Z n Xy d d k Z Wn d d d „ ƒ YZ n Xd Z
d Z d Z d „ Z
d „ Z d „ Z d
„ Z d „ Z d „ Z d
„ Z d „ Z e d j o e i e e i d ƒ ƒ n d S( iÿÿÿÿNt rpmc B s e Z e d „ ƒ Z RS( c C s8 d „ } d } | d i d ƒ } | d i d ƒ } t | ƒ } t | ƒ | j o t | ƒ } n d } xÇ | | j o¹ | | | ƒ oO | | | ƒ o? | | | | j o
d } q%t | | ƒ t | | ƒ SnM | | | ƒ o | | | ƒ o d S| | | ƒ o | | | ƒ o d S| d 7} qm Wd S( Nc S sD d | j o t | ƒ j n p t | ƒ | j o d j SS( Ni ( t len( t _listt i( ( s/ /opt/alt/alt-php-config/multiphp_reconfigure.pyt index_exists s i i t .iÿÿÿÿ( t splitR t int( t version1t version2R t rest ver1t ver2t max_numR ( ( s/ /opt/alt/alt-php-config/multiphp_reconfigure.pyt labelCompare s(
!!( t __name__t
__module__t staticmethodR ( ( ( s/ /opt/alt/alt-php-config/multiphp_reconfigure.pyR s s
11.66.0.11s /etc/scl/prefixess# /opt/alt/alt-php-config/alt-php.cfgc C s… | o
t i } n
t i } t i ƒ } | i | ƒ d } t i | d ƒ } | i | ƒ t i ƒ } | i | ƒ | i | ƒ | S( s¦
Logging configuration function.
@type verbose: bool
@param verbose: Enable additional debug output if True, display only errors
otherwise.
s %(levelname)-8s: %(message)ss %H:%M:%S %d.%m.%y( t loggingt DEBUGt ERRORt
StreamHandlert setLevelt Formattert setFormattert getLoggert
addHandler( t verboset levelt handlert
log_formatt formattert logger( ( s/ /opt/alt/alt-php-config/multiphp_reconfigure.pyt configure_logging3 s
c C sW t i i d ƒ o@ t d d ƒ i i ƒ } z | ~ } | i ƒ } | SWd QXn d S( s©
Returns cPanel version if cPanel installed or None othervise.
@rtype: str or None
@return: String with cPanel version or None if cPanel not installed.
s /usr/local/cpanel/versiont rN( t ost patht existst opent __exit__t __enter__t readt None( t _[1]t fdt version( ( s/ /opt/alt/alt-php-config/multiphp_reconfigure.pyt get_cpanel_versionJ s
&c C sq g } d } xT t i | ƒ D]C } t i i t i i | d ƒ ƒ o | i | d | f ƒ q q W| i ƒ | S( s©
Returns list of installed alt-php versions and their base directories.
@rtype: list
@return: List of version (e.g. 44, 55) and base directory tuples.
s /opt/alt/php[0-9][0-9]s usr/bin/phpiþÿÿÿ( t globR# R$ R% t joint appendt sort( t int_versionst base_path_regext int_dir( ( s/ /opt/alt/alt-php-config/multiphp_reconfigure.pyt find_interpreter_versionsX s "
c C s` y, t i i | ƒ o t i | ƒ n t SWn- t j
o! } t i d | | f ƒ t SXd S( sÜ
Remove prefix file
@type prefix_path: str
@param prefix_path: Path to the prefix file, e.g. /etc/scl/prefix/alt-php70
@rtype: bool
@return: True if file was removed sucessfully, False otherwise
u Couldn't remove prefix %s:
%sN( R# R$ R% t unlinkt Truet OSErrorR t errort False( t prefix_patht e( ( s/ /opt/alt/alt-php-config/multiphp_reconfigure.pyt
delete_prefixh s c C sq y= t | d ƒ i i ƒ } z | ~ } | i | ƒ Wd QXWn- t j
o! } t i d | | f ƒ t SXt S( sE
Creates prefix with path to alt-php
@type prefix_path: str
@param prefix_path: Path to the prefix file, e.g. /etc/scl/prefix/alt-php70
@type prefix_content: str
@param prefix_content: SCL path, e.g. /opt/cloudlinux
@rtype: bool
@return: True if file was created sucessfully, False otherwise
t wNu Couldn't open file %s:
%s( R&