OS X Execute script on exit of XBMC

I would like to execute a script when I exit XBMC. What XML would I need to modify to execute a custom script on exit?
Kodi 17, Transparency Skin
PogoPlug v4 running Arm Linux 4.4.63 as MySQL (mariadb) server.
Mac OS 10.12.5
2015 27" iMac 3.3 GHz Quad, 16GB RAM, 1TB SSD
2015 13" Macbook Pro, 8GB RAM, 256GB SSD
AppleTV 4 TV OS 10
if you use the shutdown menu to exit xbmc,
you need to modify DialogButtonMenu.xml
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.

Logout Mark Read Team Forum Stats Members Help
Execute script on exit of XBMC0
This forum uses Lukasz Tkacz MyBB addons.