2019-04-17 18:03:58 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
|
|
|
# Clear the current cluster configuration
|
|
|
|
#
|
|
|
|
|
|
|
|
here=$(dirname "$0")
|
|
|
|
# shellcheck source=multinode-demo/common.sh
|
|
|
|
source "$here"/common.sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
for i in "$SOLANA_RSYNC_CONFIG_DIR" "$SOLANA_CONFIG_DIR"; do
|
|
|
|
echo "Cleaning $i"
|
2019-07-16 19:09:14 -07:00
|
|
|
rm -rvf "${i:?}/" # <-- $i might be a symlink, rm the other side of it first
|
2019-04-17 18:03:58 -07:00
|
|
|
rm -rvf "$i"
|
|
|
|
mkdir -p "$i"
|
|
|
|
done
|
|
|
|
|
2019-07-16 19:09:14 -07:00
|
|
|
setup_secondary_mount
|