<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On 2013-08-25, at 12:23 PM, Josu Lazkano wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Hello, I want to execute a command before mythtv shutdown.<br></span></blockquote></div><div><br></div><div>Have a look at system events:</div><br><div> <a href="http://www.mythtv.org/wiki/MythTV_System_Events">http://www.mythtv.org/wiki/MythTV_System_Events</a></div><div><br></div><div>there’s one for backend shutdown which would accomplish what you want, not sure about frontend exit which might be more relevant. You attach commands to events using the myth-setup program.</div><div><br></div><div>Potential pitfalls are some TVs don’t have explicit power off IR codes - they only have ones to toggle the power state so myth may turn on your TV when it's off. Also, if the backend finishes recording while you’re watching something on another input, say a DVD, then the backend will rudely turn off the TV on you when it shuts down. Much hilarity will ensue.</div><div><br></div><div>YMMV but anyway a system event is your entry point.</div><div><br></div><div>- George</div></body></html>