From a22a3ed7e8754fbfb2f48e4a32b79d6b7468e25c Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 11 Dec 2013 13:00:18 -0800 Subject: Software update work... --- node/NodeConfig.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'node/NodeConfig.cpp') diff --git a/node/NodeConfig.cpp b/node/NodeConfig.cpp index ce5943c5..770f1f6f 100644 --- a/node/NodeConfig.cpp +++ b/node/NodeConfig.cpp @@ -56,6 +56,7 @@ #include "Poly1305.hpp" #include "SHA512.hpp" #include "Node.hpp" +#include "SoftwareUpdater.hpp" namespace ZeroTier { @@ -184,6 +185,7 @@ std::vector NodeConfig::execute(const char *command) _P("200 help join "); _P("200 help leave "); _P("200 help terminate []"); + _P("200 help updatecheck"); } else if (cmd[0] == "info") { bool isOnline = false; uint64_t now = Utils::now(); @@ -268,6 +270,13 @@ std::vector NodeConfig::execute(const char *command) if (cmd.size() > 1) _r->node->terminate(Node::NODE_NORMAL_TERMINATION,cmd[1].c_str()); else _r->node->terminate(Node::NODE_NORMAL_TERMINATION,(const char *)0); + } else if (cmd[0] == "updatecheck") { + if (_r->updater) { + _P("200 checking for software updates now at: %s",ZT_DEFAULTS.updateLatestNfoURL.c_str()); + _r->updater->checkNow(); + } else { + _P("500 software updates are not enabled"); + } } else { _P("404 %s No such command. Use 'help' for help.",cmd[0].c_str()); } -- cgit v1.2.3