I have a proprietary package, installed via a .deb file. The package provides an upstart script which uses the respawn stanza - i.e. the executable gets restarted when it is killed, even with a SIGSEGV.
I'm trying to use apport to:
- provide the core dump (or any other pertinent crash-related info)
- stop the service
I created a package-hook and placed it in /usr/share/apport/package-hooks, but I do not see it being called. I tried naming the hook as suggested in the apport developer howto (both .py and source_.py) and placing it in /usr/share/apport/general-hooks, to no avail.
The contents of the package hook file are as follows:
import os import apport.hookutils def add_info(report, ui): with open('/tmp/foo', 'w') as f: f.write("Hi\n") f.flush()
...just so I can see whether the hook gets called or not.
For the record, the hook does not get called when I issue a kill -s SIGSEGV on the package executable. The hook (/usr/share/apport/general-hooks/source_.py) does get called when I run 'apport-bug packagename'.
I'd appreciate any help and pointers (to documentation or otherwise). I'm using Ubuntu 12.04.1 LTS and apport 2.0.1-0ubuntu17.2.