diff options
author | Alex Harpin <development@landsofshadow.co.uk> | 2015-03-07 23:01:54 +0000 |
---|---|---|
committer | Yuya Kusakabe <yuya.kusakabe@gmail.com> | 2017-08-20 23:50:17 +0900 |
commit | d7618b9095bcfaba14dc75bc456f4caa34c3314f (patch) | |
tree | 7145566b3eb3ba574cc366d7b51f21d4788da026 | |
parent | 49125d7f4f71224d13381645cdbe68ff6bcfc089 (diff) | |
download | vyatta-cluster-d7618b9095bcfaba14dc75bc456f4caa34c3314f.tar.gz vyatta-cluster-d7618b9095bcfaba14dc75bc456f4caa34c3314f.zip |
vyatta-cluster: add op mode restart command for clustering
Add an op mode restart command for clustering as any failure in the
hearbeat daemon currently requires sudo /etc/init.d/heartbeat restart
Bug #510 http://bugzilla.vyos.net/show_bug.cgi?id=510
-rw-r--r-- | templates-op/restart/cluster/node.def | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/templates-op/restart/cluster/node.def b/templates-op/restart/cluster/node.def new file mode 100644 index 0000000..5f0b350 --- /dev/null +++ b/templates-op/restart/cluster/node.def @@ -0,0 +1,10 @@ +help: Restart cluster node + +run: + if cli-shell-api existsEffective cluster; then + echo -n "Restarting cluster node..." + sudo /etc/init.d/heartbeat restart >&/dev/null + if [[ $? -eq 0 ]]; then + echo "Success!" + fi + fi
\ No newline at end of file |