HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/cherrypy/__pycache__/daemon.cpython-310.pyc
o

�N�gn�@sLdZddlZddlZddlmZmZddlmZ			d
dd�Zdd	�ZdS)zThe CherryPy daemon.�N)�plugins�servers)�ApplicationFcCs�dgtjt_|p
gD]}td|�q|pgD]#}	tj�|	�ttjj�dkr;tjj�	�D]}
t
|
t�r:|
�|	�q.qtj
}|durKtj�d|i�|r\tj�ddi�t�|���|rft�||���t|d�rp|j��t|d	�rz|j��|r�|s�|s�|r�|r�tj�d
d�t�d�n7|s�|s�|r�tj�ddi�tj��tjj}|r�tjn|r�tjntj}
|
tj|d
�}tj|||d�}|��z|� �Wnt!y�t�d�YdSw|�"�dS)z2Subscribe all engine plugins and start the engine.�z	import %s�N�environmentz
log.screenF�signal_handler�console_control_handlerz?You may only specify one of the cgi, fastcgi, and scgi options.ZENGINEzengine.autoreload.on)ZapplicationZbindAddress)Z
httpserver�	bind_addr)#�sys�path�exec�cherrypy�config�update�lenZtreeZapps�values�
isinstancer�merge�enginerZ
DaemonizerZ	subscribeZPIDFile�hasattrrr	�log�error�exitZserverZunsubscriber
rZFlupFCGIServerZFlupSCGIServerZ
FlupCGIServerZ
ServerAdapter�start�	Exception�block)Zconfigfiles�	daemonizer�fastcgi�scgi�pidfile�imports�cgi�i�cZappr�addr�cls�f�s�r)�C/opt/saltstack/salt/lib/python3.10/site-packages/cherrypy/daemon.pyr
sX

�



�


��rc	Csddlm}|�}|jdddddd�|jd	d
ddd�|jd
ddddd�|jdd
ddd�|jdd
ddd�|jdd
ddd�|jdddddd�|jd d!d"dd#d�|jd$d%dd&d'd�|��\}}|jru|jD]	}tj�d|�qkt|j	|j
|j|j|j
|j|j|j�dS)(zRun cherryd CLI.r)�OptionParserz-cz--config�appendrzspecify config file(s))�action�dest�helpz-d�
store_truerzrun the server as a daemonz-ez
--environmentrNz"apply the given config environment)r.�defaultr/z-frz9start a fastcgi server instead of the default HTTP serverz-srz6start a scgi server instead of the default HTTP serverz-xr"z5start a cgi server instead of the default HTTP serverz-iz--importr!zspecify modules to importz-pz	--pidfiler z&store the process id in the given filez-Pz--Path�Pathzadd the given paths to sys.path)�optparser+�
add_option�
parse_argsr2rr�insertrrrrrrr r!r")r+�p�options�argsr)r)r*�runKsJ�
��
�
�
����

�r:)NFNFFNNF)	�__doc__rrZcherrypy.processrrrrr:r)r)r)r*�<module>s
�A