403Webshell
Server IP : 198.38.94.13  /  Your IP : 216.73.217.33
Web Server : Apache
System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : revivere ( 1140)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/icinga2.py
"""
Icinga2 Common Utils
=================

This module provides common functionality for icinga2 module and state.

.. versionadded:: 2018.8.3
"""

import logging
import re

import salt.modules.cmdmod
import salt.utils.path

__salt__ = {"cmd.run_all": salt.modules.cmdmod.run_all}
log = logging.getLogger(__name__)


def get_certs_path():
    icinga2_output = __salt__["cmd.run_all"](
        [salt.utils.path.which("icinga2"), "--version"], python_shell=False
    )
    version = re.search(r"r\d+\.\d+", icinga2_output["stdout"]).group(0)
    # Return new certs path for icinga2 >= 2.8
    if int(version.split(".")[1]) >= 8:
        return "/var/lib/icinga2/certs/"
    # Keep backwords compatibility with older icinga2
    return "/etc/icinga2/pki/"

Youez - 2016 - github.com/yon3zu
LinuXploit