cron-apt konfigurieren

Warum Debian und/oder eine seiner Spielarten? Was muss ich vorher wissen? Wo geht es nach der Installation weiter?
Antworten
mcb

cron-apt konfigurieren

Beitrag von mcb » 19.05.2021 17:23:45

Hallo ich möchte mir cron-apt so konfigurieren,

das es updates runterlädt (stündlich), aber nicht installiert.

Ist die Anleitung noch aktuel ?:

Debian Linux automatisch aktualisieren - Michis Blog
https://blog.doenselmann.com/debian-lin ... alisieren/

Mit gnome-software komme ich nicht klar, System ist Bullseye

Code: Alles auswählen

root@mb:~# cat /etc/cron.d/cron-apt
#
# Regular cron jobs for the cron-apt package
#
# Every night at 4 o'clock.
#0 4	* * *	root	test -x /usr/sbin/cron-apt && /usr/sbin/cron-apt
# Every hour.
0 *	* * *	root	test -x /usr/sbin/cron-apt && /usr/sbin/cron-apt /etc/cron-apt/config2
# Every five minutes.
# */5 *	* * *	root	test -x /usr/sbin/cron-apt && /usr/sbin/cron-apt /etc/cron-apt/config2
root@mb:~# 

Code: Alles auswählen

root@mb:~# uptime; cat /var/log/cron-apt/log 
 17:18:23 up  3:25,  1 user,  load average: 0.80, 1.12, 0.85
CRON-APT RUN [/etc/cron-apt/config2]: Wed May 19 15:00:01 CEST 2021
CRON-APT SLEEP: 1916, Wed May 19 15:31:57 CEST 2021
CRON-APT ACTION: 0-update
CRON-APT LINE: /usr/bin/apt-get -o quiet=1 update -o quiet=2
CRON-APT ACTION: 3-download
CRON-APT LINE: /usr/bin/apt-get -o quiet=1 autoclean -y
Reading package lists...
Building dependency tree...
Reading state information...
CRON-APT LINE: /usr/bin/apt-get -o quiet=1 dist-upgrade -d -y -o APT::Get::Show-Upgraded=true
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
CRON-APT RUN [/etc/cron-apt/config2]: Wed May 19 16:00:01 CEST 2021
CRON-APT SLEEP: 279, Wed May 19 16:04:40 CEST 2021
CRON-APT ACTION: 0-update
CRON-APT LINE: /usr/bin/apt-get -o quiet=1 update -o quiet=2
CRON-APT ACTION: 3-download
CRON-APT LINE: /usr/bin/apt-get -o quiet=1 autoclean -y
Reading package lists...
Building dependency tree...
Reading state information...
CRON-APT LINE: /usr/bin/apt-get -o quiet=1 dist-upgrade -d -y -o APT::Get::Show-Upgraded=true
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
CRON-APT RUN [/etc/cron-apt/config2]: Wed May 19 17:00:01 CEST 2021
CRON-APT SLEEP: 876, Wed May 19 17:14:37 CEST 2021
CRON-APT ACTION: 0-update
CRON-APT LINE: /usr/bin/apt-get -o quiet=1 update -o quiet=2
CRON-APT ACTION: 3-download
CRON-APT LINE: /usr/bin/apt-get -o quiet=1 autoclean -y
Reading package lists...
Building dependency tree...
Reading state information...
CRON-APT LINE: /usr/bin/apt-get -o quiet=1 dist-upgrade -d -y -o APT::Get::Show-Upgraded=true
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@mb:~# 


Das sieht alles richtig aus, oder ?

Weil "4.33 cron-apt" https://debiananwenderhandbuch.de/cron-apt.html

meint man müßte noch eine Verknüpfung erstellen ???

Code: Alles auswählen

ln -s /usr/sbin/cron-apt /etc/cron.hourly/cron-apt
Das wäre doch doppelt gemoppelt ?

Code: Alles auswählen

ls /etc/cron.hourly/ -la
total 20
drwxr-xr-x   2 root root  4096 May 19 14:38 .
drwxr-xr-x 163 root root 12288 May 19 13:52 ..
-rw-r--r--   1 root root   102 Oct 11  2019 .placeholder
root@mb:~# 

 :google: und Co habe ich schon probiert.

mcb

Re: cron-apt konfigurieren

Beitrag von mcb » 19.05.2021 18:51:47

So das habe ich noch gefunden:

https://wiki.debian.org/cron

-> Frage macht cron-apt Sinn auf einem Systen, das nach Lust und Laune An- und Abgeschaltet wird ? Soll nur automatisch downloaden.

systemd timers

Verstehe ich wiederum nicht ... (Wie das komplette systemd). Gibt ja auch noch Leute die nicht Informatiker sind ... :oops:

mcb

Re: cron-apt konfigurieren

Beitrag von mcb » 20.05.2021 19:13:05

OK ich antworte mir mal selbst:

das Ganz funktioniert ganz vorzüglich auch ohne den symbolischen Link.

Code: Alles auswählen

CRON-APT RUN [/etc/cron-apt/config2]: Thu May 20 16:00:01 CEST 2021
CRON-APT SLEEP: 1536, Thu May 20 16:25:37 CEST 2021
CRON-APT ACTION: 0-update
CRON-APT LINE: /usr/bin/apt-get -o quiet=1 update -o quiet=2
CRON-APT ACTION: 3-download
CRON-APT LINE: /usr/bin/apt-get -o quiet=1 autoclean -y
Reading package lists...
Building dependency tree...
Reading state information...
CRON-APT LINE: /usr/bin/apt-get -o quiet=1 dist-upgrade -d -y -o APT::Get::Show-Upgraded=true
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
CRON-APT RUN [/etc/cron-apt/config2]: Thu May 20 17:00:02 CEST 2021
CRON-APT SLEEP: 3291, Thu May 20 17:54:53 CEST 2021
CRON-APT ACTION: 0-update
CRON-APT LINE: /usr/bin/apt-get -o quiet=1 update -o quiet=2
CRON-APT ACTION: 3-download
CRON-APT LINE: /usr/bin/apt-get -o quiet=1 autoclean -y
Reading package lists...
Building dependency tree...
Reading state information...
CRON-APT LINE: /usr/bin/apt-get -o quiet=1 dist-upgrade -d -y -o APT::Get::Show-Upgraded=true
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
The following packages will be upgraded:
  gir1.2-gnomedesktop-3.0 gnome-desktop3-data gnome-settings-daemon
  gnome-settings-daemon-common libgnome-desktop-3-19 mat2 openjdk-11-jre
  openjdk-11-jre-headless
8 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 39.0 MB of archives.
After this operation, 53.2 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 gnome-desktop3-data all 3.38.5-2 [419 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 libgnome-desktop-3-19 amd64 3.38.5-2 [138 kB]
Get:3 http://deb.debian.org/debian bullseye/main amd64 gir1.2-gnomedesktop-3.0 amd64 3.38.5-2 [33.4 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 gnome-settings-daemon amd64 3.38.2-1 [338 kB]
Get:5 http://deb.debian.org/debian bullseye/main amd64 gnome-settings-daemon-common all 3.38.2-1 [596 kB]
Get:6 http://deb.debian.org/debian bullseye/main amd64 mat2 all 0.12.1-1 [72.6 kB]
Get:7 http://deb.debian.org/debian bullseye/main amd64 openjdk-11-jre amd64 11.0.11+9-1 [176 kB]
Get:8 http://deb.debian.org/debian bullseye/main amd64 openjdk-11-jre-headless amd64 11.0.11+9-1 [37.2 MB]
Fetched 39.0 MB in 18s (2203 kB/s)
Download complete and in download only mode
CRON-APT RUN [/etc/cron-apt/config2]: Thu May 20 18:00:01 CEST 2021
CRON-APT SLEEP: 3433, Thu May 20 18:57:14 CEST 2021
CRON-APT ACTION: 0-update
CRON-APT LINE: /usr/bin/apt-get -o quiet=1 update -o quiet=2
CRON-APT ACTION: 3-download
CRON-APT LINE: /usr/bin/apt-get -o quiet=1 autoclean -y
Reading package lists...
Building dependency tree...
Reading state information...
CRON-APT LINE: /usr/bin/apt-get -o quiet=1 dist-upgrade -d -y -o APT::Get::Show-Upgraded=true
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
The following packages will be upgraded:
  gir1.2-gnomedesktop-3.0 gnome-desktop3-data gnome-settings-daemon
  gnome-settings-daemon-common libgnome-desktop-3-19 mat2 openjdk-11-jre
  openjdk-11-jre-headless
8 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/39.0 MB of archives.
After this operation, 53.2 kB of additional disk space will be used.
Download complete and in download only mode
root@mb:~# 



Also das was ich wollte. :THX:

mcb

Re: cron-apt konfigurieren

Beitrag von mcb » 22.05.2021 13:14:58

:cry: es scheint den symbolichen link doch zu brauchen ... sonst startet es nach einem Nestart nicht mehr. Versteh wer will.

Mit dem link startet es jetzt zur jeden vollen Stunde und um 17 min nach -> also 2 mal :?

Wie habt ihr das eingerichtet ?

Antworten