From 008ab9a0e4229bd38699b479c0a2b84347d3526c Mon Sep 17 00:00:00 2001 From: Bob Date: Sun, 11 Sep 2016 20:59:45 +0200 Subject: [PATCH] added: execute the off command before exiting --- src/ampswitch.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ampswitch.cpp b/src/ampswitch.cpp index a882b15..f01b899 100644 --- a/src/ampswitch.cpp +++ b/src/ampswitch.cpp @@ -186,6 +186,13 @@ void CAmpSwitch::Process() } } } + + //if the off command is passed on the command line, execute that before exiting + if (m_offcommand) + { + printf("switching off, executing \"%s\"\n", m_offcommand); + system(m_offcommand); + } } void CAmpSwitch::Cleanup()