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()