diff --git a/assets/runtime/functions.sh b/assets/runtime/functions.sh index 50847d4..78ace20 100755 --- a/assets/runtime/functions.sh +++ b/assets/runtime/functions.sh @@ -105,7 +105,7 @@ function setup_salt_keys() salt-key --gen-signature --auto-create --pub ${SALT_KEYS_DIR}/master.pub --signature-path ${SALT_KEYS_DIR} fi - for pub_key in $(find ${SALT_KEYS_DIR} -type f -maxdepth 1); do + for pub_key in $(find ${SALT_KEYS_DIR} -maxdepth 1 -type f); do if [[ ${pub_key} =~ .*\.pem$ ]]; then chmod 400 ${pub_key} else @@ -113,7 +113,7 @@ function setup_salt_keys() fi done - find ${SALT_KEYS_DIR}/minions* -type f -maxdepth 1 -exec chmod 644 {} \; + find ${SALT_KEYS_DIR}/minions* -maxdepth 1 -type f -exec chmod 644 {} \; find ${SALT_HOME} -path ${SALT_KEYS_DIR}/\* -prune -o -print0 | xargs -0 chown -h ${SALT_USER}: }