Cron: test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

Locked
gustavohellwig
Posts: 11
Joined: Sat 19. Sep 2020, 20:14

Cron: test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

Post by gustavohellwig »

/etc/cron.daily/check_updates:

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.


- Looks like that the solution is just to replace the script:
from: apt update
to: apt-get update

E.g: I saw this in the internet: If I run this, I have the same error:

Code: Select all

sudo apt update | grep packages | cut -d '.' -f 1
But if I run this, I doesn't:

Code: Select all

sudo apt-get update | grep packages | cut -d '.' -f 1
gustavohellwig
Posts: 11
Joined: Sat 19. Sep 2020, 20:14

Re: Cron: test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

Post by gustavohellwig »

Hey guys, some ideas on how to solve this?
I'm receiving an email every day about that.
User avatar
Alexander
Keyweb AG
Posts: 3810
Joined: Wed 20. Jan 2016, 02:23

Re: Cron: test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

Post by Alexander »

So replacing the content of the script with the line which does not result in the Warning message should fix it.

Anyway, this script seams not to be part of minimal OS installation and does not belong to KeyHelp either. Therefore the problem you describe here is not really related to KeyHelp.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
gustavohellwig
Posts: 11
Joined: Sat 19. Sep 2020, 20:14

Re: Cron: test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

Post by gustavohellwig »

OK.
The problem is fixed with the replacement of the content from the file: /etc/cron.daily/check_updates adding apt-get instead of just apt.
I did the test even yesterday before your reply and the email was not sent today.

So, how to reply to that bug be fixed?
User avatar
Alexander
Keyweb AG
Posts: 3810
Joined: Wed 20. Jan 2016, 02:23

Re: Cron: test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

Post by Alexander »

Like I said, this file 'check_updates' is not part of KeyHelp or of a minimal operating system installation. You should point your request for fixing to the maintainer of the application, or to the people who installed this file on your server.

This has nothing do with KeyHelp nor is it a bug of KeyHelp.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Locked