Add support for using signed keys

This commit is contained in:
Carlos Álvaro
2018-10-01 00:31:12 +02:00
parent c5ea24cd4c
commit 7ec9b84a9b
5 changed files with 139 additions and 52 deletions

View File

@@ -6,23 +6,32 @@ source "${SALT_RUNTIME_DIR}/functions.sh"
[[ ${DEBUG} == true ]] && set -x
case ${1} in
app:start)
app:start|app:init|app:gen-signed-keys)
configure_salt_master
configure_salt_master
case ${1} in
app:start)
copy_minion_keys
echo "Starting salt-master..."
exec salt-master
setup_keys
echo "Starting salt-master..."
exec salt-master
;;
app:init)
setup_keys
;;
app:gen-signed-keys)
shift 1
gen_signed_keys ${1}
;;
esac
;;
app:help)
echo "Available options:"
echo " app:start - Start salt-master service. (default)"
echo " app:help - Displays this help."
echo " [command] - Execute the specified command, eg. bash."
echo " app:start - Start salt-master service. (default)"
echo " app:init - Setup salt-master without launching the service."
echo " app:gen-signed-keys <key_name> - Create a master_sign key pair and its signature inside ${SALT_KEYS_DIR}/generated/"
echo " app:help - Displays this help."
echo " [command] - Execute the specified command, eg. bash."
;;
*)
exec "$@"