diff options
Diffstat (limited to 'control/main.cpp')
-rw-r--r-- | control/main.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/control/main.cpp b/control/main.cpp index cde71d0..dd49c93 100644 --- a/control/main.cpp +++ b/control/main.cpp @@ -1,5 +1,6 @@ /** * Copyright © 2017 IBM Corporation + * Copyright © 2017-2018 Raptor Engineering, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,6 +45,10 @@ int main(int argc, char* argv[]) { mode = Mode::control; } + else if (args["shutdown"] == "true") + { + mode = Mode::shutdown; + } else { args.usage(argv); @@ -72,6 +77,12 @@ int main(int argc, char* argv[]) manager.doInit(); return 0; } + //Shutdown mode will disable fans and exit + else if (mode == Mode::shutdown) + { + manager.doShutdown(); + return 0; + } else { r = sd_event_loop(eventPtr.get()); |