summaryrefslogtreecommitdiff
path: root/templates-op/restart/cluster/node.def
diff options
context:
space:
mode:
Diffstat (limited to 'templates-op/restart/cluster/node.def')
-rw-r--r--templates-op/restart/cluster/node.def10
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