Add ability to specify an additional PID file

This commit is contained in:
Bo Maryniuk 2016-06-10 00:08:28 +02:00
parent f522a91ac6
commit eceeb4ecf2

View File

@ -28,7 +28,7 @@ class EnvLoader(object):
DEFAULT_PID_PATH = '/var/run'
DEFAULT_CACHE_PATH = '/var/cache/salt'
def __init__(self, cachedir=None, piddir=None):
def __init__(self, cachedir=None, piddir=None, pidfilename=None):
'''
Constructor.
@ -44,4 +44,4 @@ class EnvLoader(object):
if not piddir and '__salt__' in globals():
piddir = globals().get('__salt__')['config.get']('inspector.pid', '')
self.pidfile = os.path.join(piddir or self.DEFAULT_PID_PATH, self.PID_FILE)
self.pidfile = os.path.join(piddir or self.DEFAULT_PID_PATH, pidfilename or self.PID_FILE)