diff --git a/daemon/main.cpp b/daemon/main.cpp index ec6d938f4..d3ec8de27 100644 --- a/daemon/main.cpp +++ b/daemon/main.cpp @@ -1,4 +1,5 @@ #include // for ensure_config +#include #include #include #include @@ -134,6 +135,7 @@ main(int argc, char *argv[]) options.add_options() ("v,verbose", "Verbose", cxxopts::value()) ("h,help", "help", cxxopts::value()) + ("version", "version", cxxopts::value()) ("g,generate", "generate client config", cxxopts::value()) ("r,router", "generate router config", cxxopts::value()) ("f,force", "overwrite", cxxopts::value()) @@ -172,6 +174,12 @@ main(int argc, char *argv[]) return 0; } + if(result.count("version")) + { + std::cout << LLARP_VERSION << std::endl; + return 0; + } + if(result.count("generate") > 0) { genconfigOnly = true;