mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Change 'cluster.neo4j.sh' switching command to same mechanic as maintenance
This commit is contained in:
parent
202353bcb4
commit
16ce5673a3
@ -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
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user