diff options
author | Alex Harpin <development@landsofshadow.co.uk> | 2015-11-21 09:58:44 +0000 |
---|---|---|
committer | Alex Harpin <development@landsofshadow.co.uk> | 2015-11-21 09:58:44 +0000 |
commit | 47de4e7cbac02f51cd340e536988a13859afee91 (patch) | |
tree | 8ae2a0a87fe676818df5786cbcfc80530669d833 | |
parent | cfec488a33e45606b1285a073a93aa69f935d8ae (diff) | |
download | vyatta-op-47de4e7cbac02f51cd340e536988a13859afee91.tar.gz vyatta-op-47de4e7cbac02f51cd340e536988a13859afee91.zip |
vyatta-op: add restart cli command for telnet
Add a CLI op mode command to allow restarting of the Telnet service
without having to update the configuration.
Bug #514 http://bugzilla.vyos.net/show_bug.cgi?id=514
-rw-r--r-- | templates/restart/telnet/node.def | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/restart/telnet/node.def b/templates/restart/telnet/node.def new file mode 100644 index 0000000..25c305d --- /dev/null +++ b/templates/restart/telnet/node.def @@ -0,0 +1,14 @@ +help: Restart Telnet service + +run: + if cli-shell-api existsActive service telnet; then + port="$(cli-shell-api returnActiveValue service telnet port)" + listen_address="$(cli-shell-api returnActiveValue service telnet listen-address)" + echo "Restarting Telnet..." + /opt/vyatta/sbin/vyatta_update_telnet enable $port $listen_address + if [[ $? -eq 0 ]]; then + echo "Success!" + fi + else + echo "Telnet is not configured" + fi |