File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/apache.cpython-310.pyc
o
�N�g)1 � @ s� d Z ddlZddlZddlZddlZddlZddlZddl Zddl
ZddlZddlm
Z
e�e�Zdd� Zdd� Zdd � Zd
d� Zdd
� Zdd� Zdd� Zdd� Zd#dd�Zd$dd�Zdd� Zd%dd�Zd#dd�Zd&d!d"�ZdS )'a)
Support for Apache
.. note::
The functions in here are generic functions designed to work with
all implementations of Apache. Debian-specific functions have been moved into
deb_apache.py, but will still load under the ``apache`` namespace when a
Debian-based system is detected.
� N)�
SaltExceptionc C s t � } tjj�| �rdS dS )z5
Only load the module if apache is installed
Zapache)FzFThe apache execution module cannot be loaded: apache is not installed.)�
_detect_os�salt�utils�path�which)�cmd� r �G/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/apache.py�__virtual__ s r c C s, t d } | dkr
dS | dks| dkrdS dS )zA
Apache commands and paths differ depending on packaging
� os_familyZRedHatZ apachectlZDebianZSuseZ
apache2ctl)Z
__grains__)r r r r
r '