This commit is contained in:
10
src/main.cpp
10
src/main.cpp
@@ -8,6 +8,8 @@
|
||||
#include <memory>
|
||||
#include <thread>
|
||||
|
||||
#include "version.hpp"
|
||||
|
||||
namespace simple_object_storage {
|
||||
|
||||
std::atomic<bool> g_running{true};
|
||||
@@ -106,6 +108,14 @@ void signal_handler(int signal) {
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
if (argc > 1) {
|
||||
if (std::string(argv[1]) == "version") {
|
||||
std::cout << dropshell::VERSION << std::endl;
|
||||
return 0;
|
||||
}
|
||||
std::cout << "simple_object_storage version: " << dropshell::VERSION << std::endl;
|
||||
}
|
||||
|
||||
// Set up signal handlers
|
||||
struct sigaction sa;
|
||||
sa.sa_handler = signal_handler;
|
||||
|
Reference in New Issue
Block a user