diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt index d425cb260e39a645bce0fb6569d93874b42e917e..c8ec7cbc17719a0ec81eacc8ef404184faccc4f6 100644 --- a/bin/CMakeLists.txt +++ b/bin/CMakeLists.txt @@ -1,4 +1,8 @@ add_executable(hepnos-daemon hepnos-daemon.cpp) target_link_libraries(hepnos-daemon hepnos-service yaml-cpp margo bake-server sdskv-server) +add_executable(hepnos-shutdown hepnos-shutdown.cpp) +target_link_libraries(hepnos-shutdown hepnos yaml-cpp margo) + +install(TARGETS hepnos-shutdown DESTINATION bin) install(TARGETS hepnos-daemon DESTINATION bin) diff --git a/bin/hepnos-shutdown.cpp b/bin/hepnos-shutdown.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2de750541c11b888fa04d5114a16ed776a48adb5 --- /dev/null +++ b/bin/hepnos-shutdown.cpp @@ -0,0 +1,15 @@ +#include +#include + +int main(int argc, char* argv[]) +{ + if(argc != 2) { + std::cerr << "Usage: " << argv[0] << " " << std::endl; + exit(-1); + } + + hepnos::DataStore datastore(argv[1]); + datastore.shutdown(); + + return 0; +}