webapps team mailing list archive
-
webapps team
-
Mailing list archive
-
Message #00018
Re: ubuntu-webapps-update-index, adding new regular jobs
On Wed, Sep 05, 2012 at 11:53:18AM -0700, Robert Carr wrote:
> Hi all! CCing the Desktop crew again for some help ;)
>
> As part of the webapp autodiscovery/installation cycle through dpkg
> there is a binary in libunity-webapps (ubuntu-webapps-update-index)
> which needs to be run at some regular interval (it is based off the
> results of apt-cache so no sense running it more often than an apt
> update it seems?).
>
> Where is the right place to put this, and is there existing
> convention/process?
>
> Note the binary runs as user (so some awkwardness with the apt
> update mechanism)
You can hook into APT::Update::Post-Invoke-Success, for a example see:
/etc/apt/apt.conf.d/15update-stamp
But you can not use this for long running stuff as it will block apt
until the script is done. So typically this is used to write a stamp
file or send a dbus signal. A tiny dbus activated thing that runs your
script when the signal is delivered would probably a good solution.
Cheers,
Michael
References