@@ -22,6 +22,7 @@ INSTALL_ROOT_DIR = "/usr/bin"
|
||||
LOG_DIR = "/var/log/telegraf"
|
||||
SCRIPT_DIR = "/usr/lib/telegraf/scripts"
|
||||
CONFIG_DIR = "/etc/telegraf"
|
||||
CONFIG_DIR_D = "/etc/telegraf/telegraf.d"
|
||||
LOGROTATE_DIR = "/etc/logrotate.d"
|
||||
|
||||
INIT_SCRIPT = "scripts/init.sh"
|
||||
@@ -115,7 +116,7 @@ def create_package_fs(build_root):
|
||||
logging.debug("Creating a filesystem hierarchy from directory: {}".format(build_root))
|
||||
# Using [1:] for the path names due to them being absolute
|
||||
# (will overwrite previous paths, per 'os.path.join' documentation)
|
||||
dirs = [ INSTALL_ROOT_DIR[1:], LOG_DIR[1:], SCRIPT_DIR[1:], CONFIG_DIR[1:], LOGROTATE_DIR[1:] ]
|
||||
dirs = [ INSTALL_ROOT_DIR[1:], LOG_DIR[1:], SCRIPT_DIR[1:], CONFIG_DIR[1:], LOGROTATE_DIR[1:], CONFIG_DIR_D[1:] ]
|
||||
for d in dirs:
|
||||
os.makedirs(os.path.join(build_root, d))
|
||||
os.chmod(os.path.join(build_root, d), 0o755)
|
||||
|
||||
Reference in New Issue
Block a user