Edit: /opt/dedrads/__pycache__/envinfo.cpython-313.pyc (8184B)
}j S r SSKrSSKrSSKrSSKJr SrSrSrSr S\S .r
" S
S\5 rSS jr
S
rS r\S:X a \" 5 gg)z+Gather information about system environment N)ArgumentParserzDaniel Kzdanielk@inmotionhosting.comz0.1.1z
2016-09-22uninitiated)statusversionc , ^ \ rS rSrSrU 4S jrSrU =r$ )EnvInfoError zCustom error class for module.c $ > [ TU ] U5 g)z#Init with call to base constructor.N)super__init__)selfmessage __class__s /opt/dedrads/envinfo.pyr EnvInfoError.__init__ s
! )__name__
__module____qualname____firstlineno____doc__r __static_attributes__
__classcell__)r s @r r r s (" "r r c U b) U [ : a [ SR U [ 5 5 eUb) U[ : a [ SR U[ 5 5 e[ R R S5 ( a
S[ S' O S[ S' [ R R S5 ( a2 S[ S ' S
[ S' S[ S
' [ S S:X a S[ S' OU[ R R S5 ( a1 S[ S ' S[ S' S[ S
' [ S S:X a S[ S' / n[ S S:X a [ R " S5 nO[ R R S5 ( a [ R R S5 ( ar [ SSS9 n U HV n[ UR S5 S 5 nSUs=:: a S: d M/ O M3 UR UR S5 S 5 MX SSS5 OO[ S5 eU[ S' S[ S ' [ $ ! [ a n[ S5 UeSnAff = f! , ( d f ND= f)!a2
Main function for module, used to acquire environment information.
min_version - If set, require envinfo.py
to have a version greater than min_version
max_version - If set, require envinfo.py
to have a version less than max_version
Returns dictionary of environment information. Currently, the only
guaranteed entries are 'type', 'platform', and 'users'. The following
are the keys that which may be present:
type - General type of environment. Can be 'cpanel' or 'unknown'
platform - Operating system information
web_server - Type of webserver. Currently only 'apache'
users - List of users.
Apache related keys:
easyapache - Version of EasyApache if present
apache_conf - Location of httpd.conf for Apache
apache_domlogs - Location of Apache domlogs
On error will throw EnvInfoError.
Nz5Minimum version {} is greater than current version {}z2Maximum version {} is less than current version {}z/var/cpanelcpaneltypeunknownz/etc/apache2/conf/httpd.confapache_confz/var/log/apache2/domlogsapache_domlogsapache
web_server4
easyapachez!/usr/local/apache/conf/httpd.confz/usr/local/apache/domlogs3z/var/cpanel/users/z/etc/passwdzutf-8)encoding: i i } r zCould not read from /etc/passwdz)Unable to make user list for server type.users initiatedr )__version__r formatospathisdirDATAisfilelistdirexistsopenintsplitappendOSError)min_versionmax_version user_listfile_handlelineuides r get_datar@ s 8 ;#<CJJ[
;#<@GG[
ww}}]##V V ww~~455<]!;
%\<8#!$D ; < <A]!<
%\<8#!$DIF|xJJ34
& &
77>>-((mg6+Q +!$**S/!"45#---%,,TZZ_Q-?@ !, 76 ) FGGDM DNK Q&'HIqPQ
76s0 3I5-H?&+H??
I III
I+c [ [ S9n U R S5 nUR 5 nUR SSSSSSS 9 UR S
SSSSS
S 9 UR SSSSSS 9 UR SSSSS9 U R SSSSSS9 U R 5 nUR ( a; [ S[ 35 [ S[ S35 [ R " S5 UR UR 4$ )z
Parse command line arguments
)descriptionzOutput optionsz-ez
--environmentstore_constoutput_typeenvzAPrint general system environment information.This is the defualt.)actiondestconsthelpz-uz--usersr) z4Print list of users rather than general environment.z
--apache-confr z&Print location of Apache's httpd.conf.z-jz--json
store_truezPrint results in JSON)rF rI z-vz-Vz --versionz#Print version information and exit.z%Environment Information tool version zLast modified on .r )r r add_argument_groupadd_mutually_exclusive_groupadd_argument
parse_argsr printr+ __date__sysexitrD json)parseroutput_groupoutput_type_groupargss r rO rO r s<
0F,,-=>L$AAC""
# #
""
C
# ""
5 # h|2I
2 D||
5k]CD
!(1-.dii((r c [ 5 u p [ 5 nU S:X aH WS nU( a! [ [ R
" USSSS95 g[ SR
U5 5 gU S :X aJ S W; a5 [ R R S
5 [ R " S5 [ US 5 gU( a! [ [ R
" WSSSS95 g[ 5 [ S5 [ 5 [ S
R WS 5 5 [ SR SR
US 5 5 5 [ SR US 5 5 [ SR US 5 5 [ SR US 5 5 [ 5 [ S5 [ SR
US 5 5 [ 5 g! [ a! n[ S5 [ U5 SnAGNSnAff = f)z4Function to be called when run from the command linezError:Nr) T ),z: ) sort_keysindent
separators
r zNo Apache configuration found
zServer EnvironmentzServer Type: {}r zOS: {} platformzWeb Server: {}r" zApache configuration: {}zApache domain logs: {}r zUsers:)rO r@ r rP rT dumpsjoinrR stderrwriterS r, )rD use_jsondataerrorr) s r mainrj s )l[z
gW
T!
$))E"#
%$JJ>?HHSM
d=!"
D{
G&'G.55d6lCD,33CHHT*=M4NO
.55d<6HIJ.55d=6IJK.55d;K6LMNG(O#((4=)*GY
h
es
G
H$H H__main__)NN)r r- rR rT argparser __maintainer__ __email__r+ rQ r0 Exceptionr r@ rO rj r r r r
rp sg 1
#) K8"9 "Tn;)|3l zF r