summaryrefslogtreecommitdiff
path: root/templates/service/ssh/node.def
diff options
context:
space:
mode:
Diffstat (limited to 'templates/service/ssh/node.def')
-rw-r--r--templates/service/ssh/node.def14
1 files changed, 7 insertions, 7 deletions
diff --git a/templates/service/ssh/node.def b/templates/service/ssh/node.def
index 17e9b3dd..a16f5d15 100644
--- a/templates/service/ssh/node.def
+++ b/templates/service/ssh/node.def
@@ -1,17 +1,17 @@
-help: "Enable/disable SSH protocol"
-delete: "sudo /usr/sbin/invoke-rc.d ssh stop && \
+help: Enable/disable SSH protocol
+delete:expression: "sudo /usr/sbin/invoke-rc.d ssh stop && \
sudo sh -c \"echo 'SSHD_OPTS=' > /etc/default/ssh\" "
-end: "if [ -z \"$(port/@)\" ]; then exit 0; fi; \
+end:expression: "if [ -z \"$VAR(port/@)\" ]; then exit 0; fi; \
sudo sh -c \
\"[ -f /etc/ssh/ssh_host_key ] \
|| sudo ssh-keygen -t rsa1 -N '' -f /etc/ssh/ssh_host_key\"; \
- case \"$(protocol-version/@)\" in \
+ case \"$VAR(protocol-version/@)\" in \
v2) VER=2;; \
v1) VER=1;; \
all) VER=\"1,2\";; \
*) VER=2;; \
esac; \
- STR=\"SSHD_OPTS=\\\"-p $(port/@) -o HostKey=/etc/ssh/ssh_host_key \
--o Protocol=\\\${VER}\\\"\"; \
- sudo sh -c \"echo '\\\$STR' > /etc/default/ssh\"; \
+ STR=\"SSHD_OPTS=\\\"-p $VAR(port/@) -o HostKey=/etc/ssh/ssh_host_key \
+-o Protocol=${VER}\\\"\"; \
+ sudo sh -c \"echo '$STR' > /etc/default/ssh\"; \
sudo /usr/sbin/invoke-rc.d ssh restart"