Add options to entrypoint.sh

This commit is contained in:
Carlos Álvaro
2018-09-30 23:56:22 +02:00
parent 47f61842e8
commit c5ea24cd4c
4 changed files with 31 additions and 22 deletions

View File

@@ -1,14 +1,30 @@
#!/usr/bin/env bash
set -e
source "${SALT_RUNTIME_DIR}/functions.sh"
# Copy minion keys
copy_minion_keys
[[ ${DEBUG} == true ]] && set -x
case ${1} in
app:start)
# Configure salt-master
configure_salt_master
case ${1} in
app:start)
copy_minion_keys
echo "Starting salt-master..."
exec salt-master
;;
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."
;;
*)
exec "$@"
;;
esac