diff options
Diffstat (limited to 'templates-op/force/cluster')
-rw-r--r-- | templates-op/force/cluster/active/node.def | 4 | ||||
-rw-r--r-- | templates-op/force/cluster/standby/node.def | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/templates-op/force/cluster/active/node.def b/templates-op/force/cluster/active/node.def index d610277..fc91fc7 100644 --- a/templates-op/force/cluster/active/node.def +++ b/templates-op/force/cluster/active/node.def @@ -8,7 +8,7 @@ run: local -a grp ; echo "Warning: Auto-failback is configured." fi sudo /usr/share/heartbeat/hb_takeover >&/dev/null - echo "Requesting to take over cluster resources." + echo "Requesting to take over cluster resources" else - echo "Clustering is not configured." + echo "Clustering is not configured" fi 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 |