Bugfix when keys/minions directory did not exist

Addressed a bug that caused the container to crash
when `/home/salt/data/keys/minions` was not present

Issue #9
This commit is contained in:
Carlos Álvaro
2018-12-19 22:21:34 +01:00
parent f0bbbdcb33
commit 74431312d6
2 changed files with 5 additions and 0 deletions

View File

@@ -182,6 +182,10 @@ function initialize_datadir()
mkdir -p /var/cache/salt/master
chown -R ${SALT_USER}: /var/cache/salt
# Keys directories
mkdir -p ${SALT_KEYS_DIR}/minions
chown -R ${SALT_USER}: ${SALT_KEYS_DIR}
# Logs directory
mkdir -p ${SALT_LOGS_DIR}/salt ${SALT_LOGS_DIR}/supervisor
chmod -R 0755 ${SALT_LOGS_DIR}/supervisor