2014-01-05 15:46:44 +00:00
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
|
|
|
# http://stackoverflow.com/a/404750
|
|
|
|
# determine if application is a script file or frozen exe
|
|
|
|
if getattr(sys, 'frozen', False):
|
|
|
|
application_path = os.path.dirname(sys.executable)
|
|
|
|
elif __file__:
|
|
|
|
application_path = os.path.dirname(__file__)
|
|
|
|
|
2014-01-24 14:42:43 +00:00
|
|
|
ROOT_DIR=application_path.split("bin/appdata")[0]
|
2014-01-05 15:46:44 +00:00
|
|
|
|
|
|
|
# Copied from syspaths.py
|
|
|
|
CONFIG_DIR = os.path.join(ROOT_DIR, 'etc')
|
|
|
|
CACHE_DIR = os.path.join(ROOT_DIR, 'var', 'cache', 'salt')
|
|
|
|
SOCK_DIR = os.path.join(ROOT_DIR, 'var', 'run', 'salt')
|
|
|
|
SRV_ROOT_DIR = os.path.join(ROOT_DIR, 'srv')
|
|
|
|
BASE_FILE_ROOTS_DIR = os.path.join(SRV_ROOT_DIR, 'salt')
|
|
|
|
BASE_PILLAR_ROOTS_DIR = os.path.join(SRV_ROOT_DIR, 'pillar')
|
2016-02-06 16:03:53 +00:00
|
|
|
BASE_THORIUM_ROOTS_DIR = os.path.join(SRV_ROOT_DIR, 'thorium')
|
2014-01-05 15:46:44 +00:00
|
|
|
BASE_MASTER_ROOTS_DIR = os.path.join(SRV_ROOT_DIR, 'salt-master')
|
|
|
|
LOGS_DIR = os.path.join(ROOT_DIR, 'var', 'log', 'salt')
|
|
|
|
PIDFILE_DIR = os.path.join(ROOT_DIR, 'var', 'run')
|
2015-08-28 21:42:44 +00:00
|
|
|
SPM_FORMULA_PATH = os.path.join(ROOT_DIR, 'spm', 'salt')
|
|
|
|
SPM_PILLAR_PATH = os.path.join(ROOT_DIR, 'spm', 'pillar')
|
|
|
|
SPM_REACTOR_PATH = os.path.join(ROOT_DIR, 'spm', 'reactor')
|