summaryrefslogtreecommitdiff
path: root/templates/restart/ssh
diff options
context:
space:
mode:
Diffstat (limited to 'templates/restart/ssh')
-rw-r--r--templates/restart/ssh/node.def12
1 files changed, 12 insertions, 0 deletions
diff --git a/templates/restart/ssh/node.def b/templates/restart/ssh/node.def
new file mode 100644
index 0000000..1fa1aff
--- /dev/null
+++ b/templates/restart/ssh/node.def
@@ -0,0 +1,12 @@
+help: Restart SSH service
+
+run:
+ if cli-shell-api existsActive service ssh; then
+ echo "Restarting SSH..."
+ sudo /usr/sbin/invoke-rc.d ssh restart
+ if [[ $? -eq 0 ]]; then
+ echo "Success!"
+ fi
+ else
+ echo "SSH is not configured"
+ fi