IMPORANT: This demonstration is intended as an example.
You must test your own version in a non-production environment before deploying to production.
Save this as 3-teardown-all.sh
:
#!/usr/bin/env bash
# Copyright 2021 ForgeRock AS. All Rights Reserved
#
# Use of this code requires a commercial software license with ForgeRock AS.
# or with one of its affiliates. All use shall be exclusively subject
# to such license between the licensee and ForgeRock AS.
# Stop and remove demo servers.
BASE_DIR=/path/to
remove() {
server=${1}
${BASE_DIR}/${server}/bin/stop-ds
rm -rf ${BASE_DIR}/${server}
}
for server in ds-*; do
remove ${server}
done
for server in rs-*; do
remove ${server}
done