diff options
author | Alex Harpin <development@landsofshadow.co.uk> | 2015-03-07 23:01:54 +0000 |
---|---|---|
committer | Alex Harpin <development@landsofshadow.co.uk> | 2015-03-07 23:01:54 +0000 |
commit | 17c147c18f5061df26b411ce28ad9155ded21081 (patch) | |
tree | 8d9877949fd60f1ece0be6ba2dcecad16a3f5da4 | |
parent | 73aae9519bcc962f3dd0f6b4c8adc56dfde57d6a (diff) | |
download | vyatta-cluster-17c147c18f5061df26b411ce28ad9155ded21081.tar.gz vyatta-cluster-17c147c18f5061df26b411ce28ad9155ded21081.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 |