summaryrefslogtreecommitdiff
path: root/node/NodeConfig.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-12-11 13:00:18 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-12-11 13:00:18 -0800
commita22a3ed7e8754fbfb2f48e4a32b79d6b7468e25c (patch)
tree5ca1866c35c048d85c1895e3ed7ec5fb8de740e3 /node/NodeConfig.cpp
parentc5ef502b42f4c4e4a0cc89a1fb7e42cbb8743878 (diff)
downloadinfinitytier-a22a3ed7e8754fbfb2f48e4a32b79d6b7468e25c.tar.gz
infinitytier-a22a3ed7e8754fbfb2f48e4a32b79d6b7468e25c.zip
Software update work...
Diffstat (limited to 'node/NodeConfig.cpp')
-rw-r--r--node/NodeConfig.cpp9
1 files changed, 9 insertions, 0 deletions
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<std::string> NodeConfig::execute(const char *command)
_P("200 help join <network ID>");
_P("200 help leave <network ID>");
_P("200 help terminate [<reason>]");
+ _P("200 help updatecheck");
} else if (cmd[0] == "info") {
bool isOnline = false;
uint64_t now = Utils::now();
@@ -268,6 +270,13 @@ std::vector<std::string> 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());
}