:: Re: [DNG] tool to check for updates…
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Giovanni Rapagnani
Ημερομηνία:  
Προς: dng
Αντικείμενο: Re: [DNG] tool to check for updates without root??
On 22/06/16 08:20, KatolaZ wrote:
> On Wed, Jun 22, 2016 at 02:15:17AM +0200, emninger@??? wrote:


> The easiest way is to have a cron script that runs once a day, with
> root provileges, and calls "apt-get update".


another way of periodically updating the lists of packages is to add
this line in a file under /etc/apt/apt.conf.d/ e.g.
/etc/apt/apt.conf.d/10periodic:

APT::Periodic::Update-Package-Lists "1";

The update of the package lists will then be triggered once a day by the
script /etc/cron.daily/apt .

If your system is not always up and you have anacron installed, doing it
this way is better than creating a cron job running apt-get update.
Because anacron is responsible for the execution of scripts under
/etc/cron.daily (see /etc/anacrontab), you are assured that the update
is run as soon as your system is up and 24 hours are elapsed since the
last time the scripts under /etc/crond.daily/ were run.

Giovanni