Skip to content

Commit

Permalink
feat: Add platform-specific check for keycloak_pid in test deployment…
Browse files Browse the repository at this point in the history
… script

Mac version of the script 1.oid4vci_test_deployment.sh #31
  • Loading branch information
bengo237 committed May 28, 2024
1 parent 91addf1 commit 1396b5c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion 1.oid4vci_test_deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,14 @@ $KC_INSTALL_DIR/bin/kcadm.sh create clients -o -f - < $WORK_DIR/client-oid4vc.js

# Useful link to check the configuration
# Ensure keycloak with oid4vc-vci profile is running
keycloak_pid=$(ps aux | grep -i '[k]eycloak' | awk '{print $2}')
if [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
keycloak_pid=$(ps aux | grep -i 'quarkus' | awk '{print $2}')
else
# Linux/Unix
keycloak_pid=$(ps aux | grep -i '[k]eycloak' | awk '{print $2}')
fi

if [ ! -n "$keycloak_pid" ]; then
echo "Keycloak not running. Start keycloak using 0.start-kc-oid4vci first..."
exit 1 # Exit with an error code
Expand Down

0 comments on commit 1396b5c

Please sign in to comment.