diff options
Diffstat (limited to 'templates-op/force/cluster/standby')
-rw-r--r-- | templates-op/force/cluster/standby/node.def | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/templates-op/force/cluster/standby/node.def b/templates-op/force/cluster/standby/node.def index 3490960..f60816c 100644 --- a/templates-op/force/cluster/standby/node.def +++ b/templates-op/force/cluster/standby/node.def @@ -1,3 +1,9 @@ help: Release cluster resources and allow a remote to become master -run: sudo /usr/share/heartbeat/hb_standby >&/dev/null - echo "Attempting to release cluster resources." +run: local -a grp ; + eval "grp=($(cli-shell-api listActiveNodes cluster group))" + if [ -n "$grp" ]; then + sudo /usr/share/heartbeat/hb_standby >&/dev/null + echo "Attempting to release cluster resources" + else + echo "Clustering is not configured" + fi |