On Mon, Sep 19, 2016 at 10:57:01PM +0100, Andy Blanchard wrote:
> On 19 September 2016 at 22:38, Patrick Dupre <pdu...@gmx.com> wrote:
> > I did:
> > systemctl enable mlocate-updatedb.service
> > (no error)
> > but it still does not seem to be enabled:
> > ‚óŹ mlocate-updatedb.service - Update a database for mlocate
> >    Loaded: loaded (/usr/lib/systemd/system/mlocate-updatedb.service; 
> > static; vendor preset: disable
> >    Active: inactive (dead)
                                                                        ^^^^^^^^

From what I can tell, static services are not intended to be enabled.  They are
things that will be executed on an as needed basis from other things.  In this
case it is mlocate-updatedb.timer (timer not service).

> >
> > Sep 19 23:15:02 teucidide systemd[1]: Stopped Update a database for mlocate.
> > Sep 19 23:15:03 teucidide systemd[1]: Started Update a database for mlocate.
> >
> > systemctl is-enabled mlocate-updatedb.service
> > static
> >
> > Is it OK ?
> 
> AFAICT the service only runs the mlocate update once on boot.  What
> you need for regular mlocate DB updates is the systemd timer, which
> will run the necessary script at midnight every day by default:
> 
> systemctl enable mlocate-updatedb.timer
> 
> Note that last bit reads "timer" not "service".  You can check if it's
> enabled by running:
> 
> systemctl list-timers
> 
> and looking for "mlocate-updatedb.timer" in the fifth ("UNIT") column
> - the entry in the first column is when it's next scheduled to run.

If .timer units are like .service units, enabling will only affect its
startup at the next boot.  You will have to "systemctl start" or restart
the unit to have it available during the current boot.

Jon
-- 
Jon H. LaBadie                  jo...@jgcomp.com
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org

Reply via email to