[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Detect upgradable packages in shell script ran as a non-root user



On Wed, Nov 30, 2016 at 10:13:40AM -0500, Greg Wooledge wrote:
> On Wed, Nov 30, 2016 at 05:09:20PM +0200, Martin T wrote:
> > I would like to run a cron job which periodically checks if I have
> > upgradable packages. One way to do it is probably like this:
> > 
> > $ apt-get upgrade -s | grep -q "^0 upgraded"
> 
> But you have to run apt-get update first, AS root.  (Your subject line
> includes the phrase "as a non-root user", but you neglected to include
> this important piece of information in the body of the email.  I say
> this now, because someone might change the subject header later.)
> 

root is needed for the update, maybe what you search is cron-apt ;)

https://debian-administration.org/article/162/A_short_introduction_to_cron-apt
-- 

I'm just a placeholder for a really awesome signature...
...that is still missing *sob*

Attachment: signature.asc
Description: PGP signature


Reply to: