Change 'cluster.neo4j.sh' switching command to same mechanic as maintenance

This commit is contained in:
Wolfgang Huß 2023-10-25 13:26:23 +02:00
parent 202353bcb4
commit 16ce5673a3
2 changed files with 5 additions and 5 deletions

View File

@ -20,7 +20,7 @@ mkdir -p ${BACKUP_FOLDER}
# maintenance mode on
# set Neo4j in offline mode (maintenance)
${SCRIPT_DIR}/cluster.neo4j.sh offline-mode
${SCRIPT_DIR}/cluster.neo4j.sh off
# database backup
kubectl --kubeconfig=${KUBECONFIG} -n default exec -it \
@ -35,4 +35,4 @@ kubectl --kubeconfig=${KUBECONFIG} cp \
# set Neo4j in online mode
# maintenance mode off
${SCRIPT_DIR}/cluster.neo4j.sh online-mode
${SCRIPT_DIR}/cluster.neo4j.sh on

View File

@ -14,7 +14,7 @@ fi
KUBECONFIG=${KUBECONFIG:-${SCRIPT_DIR}/../configurations/${CONFIGURATION}/kubeconfig.yaml}
case $1 in
offline-mode)
off)
# maintenance mode on
${SCRIPT_DIR}/cluster.maintenance.sh on
@ -26,7 +26,7 @@ case $1 in
# wait for the container to restart
sleep 60
;;
online-mode)
on)
# set Neo4j in online mode
kubectl --kubeconfig=${KUBECONFIG} get deployment ocelot-neo4j -o json \
| jq 'del(.spec.template.spec.containers[].command)' \
@ -39,7 +39,7 @@ case $1 in
${SCRIPT_DIR}/cluster.maintenance.sh off
;;
*)
echo -e "Run this script with first argument either 'offline-mode' or 'online-mode'"
echo -e "Run this script with first argument either 'off' or 'on'"
exit
;;
esac