Add support for pygit2

This commit is contained in:
Carlos Álvaro
2018-11-07 22:42:56 +01:00
parent 1bb94cac4e
commit 2f701fbef8
3 changed files with 39 additions and 5 deletions

View File

@@ -64,7 +64,7 @@ EOF
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 2); do
for pub_key in $(find ${SALT_KEYS_DIR} -type f -maxdepth 1); do
if [[ ${pub_key} =~ .*\.pem$ ]]; then
chmod 400 ${pub_key}
else
@@ -72,6 +72,7 @@ EOF
fi
done
find ${SALT_KEYS_DIR}/minions* -type f -maxdepth 1 -exec chmod 644 {} \;
find ${SALT_HOME} -path ${SALT_KEYS_DIR}/\* -prune -o -print0 | xargs -0 chown -h ${SALT_USER}:
}