mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
check for SERVICE_DIR in __virtual__ in salt.modules.daemontools (#37748)
* set __virtualname__ to 'service' * add SERVICE_DIR check in __virtual__
This commit is contained in:
parent
fa7883115e
commit
6ba8d4e97f
1 changed files with 3 additions and 1 deletions
|
@ -48,7 +48,9 @@ for service_dir in VALID_SERVICE_DIRS:
|
|||
def __virtual__():
|
||||
# Ensure that daemontools is installed properly.
|
||||
BINS = frozenset(('svc', 'supervise', 'svok'))
|
||||
return __virtualname__ if all(salt.utils.which(b) for b in BINS) else False
|
||||
if all(salt.utils.which(b) for b in BINS) and SERVICE_DIR:
|
||||
return __virtualname__
|
||||
return False
|
||||
|
||||
|
||||
def _service_path(name):
|
||||
|
|
Loading…
Add table
Reference in a new issue