diff options
author | Alex Harpin <development@landsofshadow.co.uk> | 2015-11-21 11:27:07 +0000 |
---|---|---|
committer | Alex Harpin <development@landsofshadow.co.uk> | 2015-11-21 11:27:07 +0000 |
commit | a211d7fcbed2b8c791db0134c18c61578d82b639 (patch) | |
tree | 89dc2a5084322f1a383a48dee0f03a5a7f57d01b /templates | |
parent | 47de4e7cbac02f51cd340e536988a13859afee91 (diff) | |
download | vyatta-op-a211d7fcbed2b8c791db0134c18c61578d82b639.tar.gz vyatta-op-a211d7fcbed2b8c791db0134c18c61578d82b639.zip |
vyatta-op: add restart cli command for ntp
Add a CLI op mode command to allow restarting of the NTP service
without having to update the configuration.
Bug #514 http://bugzilla.vyos.net/show_bug.cgi?id=514
Diffstat (limited to 'templates')
-rw-r--r-- | templates/restart/ntp/node.def | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/templates/restart/ntp/node.def b/templates/restart/ntp/node.def new file mode 100644 index 0000000..d94bb8e --- /dev/null +++ b/templates/restart/ntp/node.def @@ -0,0 +1,12 @@ +help: Restart NTP service + +run: + if cli-shell-api existsActive system ntp server; then + echo "Restarting NTP server..." + sudo /usr/sbin/invoke-rc.d ntp force-reload + if [[ $? -eq 0 ]]; then + echo "Success!" + fi + else + echo "NTP server is not configured" + fi |