42 lines
955 B
Bash
Executable File
42 lines
955 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Get the directory where this script is located
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
|
|
# Check if subcommand is provided
|
|
if [[ $# -eq 0 ]]; then
|
|
echo "Usage: $0 <command> [options]"
|
|
echo ""
|
|
echo "Commands:"
|
|
echo " create-keycloak-account Create a new Keycloak account"
|
|
echo " set-name Set user firstName and lastName"
|
|
echo " verify-email Verify user email"
|
|
echo " reset-password Reset user password"
|
|
exit 1
|
|
fi
|
|
|
|
# Get subcommand
|
|
subcommand="$1"
|
|
shift
|
|
|
|
# Route to appropriate script
|
|
case "$subcommand" in
|
|
create-keycloak-account)
|
|
"$SCRIPT_DIR/create-keycloak-account" "$@"
|
|
;;
|
|
set-name)
|
|
"$SCRIPT_DIR/set-name" "$@"
|
|
;;
|
|
verify-email)
|
|
"$SCRIPT_DIR/verify-email" "$@"
|
|
;;
|
|
reset-password)
|
|
"$SCRIPT_DIR/reset-password" "$@"
|
|
;;
|
|
*)
|
|
echo "Unknown command: $subcommand"
|
|
echo "Run '$0' for usage information"
|
|
exit 1
|
|
;;
|
|
esac
|