Apticron / automatische Benachrichtigung bei Updates

Aus Root-Wiki
Wechseln zu: Navigation, Suche

Das Programm apticron ist ein Shellscript, welches einmal täglich auf Updates prüft und den Administrator per E-Mail benachrichtigt.

Installation

Die Installation ist eigentlich recht einfach:

apt-get install apticron

Danach ist das Programm installiert.

Konfiguration

Hier gibt es 2 Möglichkeiten. Einmal die Konfigurationsdatei anpassen oder per "dpkg-reconfigure".

Konfigurationsdatei

Die Datei befindet sich in den Ordner /etc/apticron.

nano /etc/apticron/apticron.conf

Ganz am Anfang kann man die Empfänger E-Mail Adresse eingeben.

# set EMAIL to a space separated list of addresses which will be notified of
# impending updates
#
EMAIL="root"


Optional kann man die die Variable "SYSTEM" konfigurieren, falls in der E-Mail ein anderer Name angegeben werden soll, als der Hostname.

# Set SYSTEM if you would like apticron to use something other than the output
# of "hostname -f" for the system name in the mails it generates. This option
# overrides the ALL_FQDNS above.
#
# SYSTEM="foobar.example.com"

dpkg-reconfigure

Mit folgendem Befehl kann man ebenfalls die E-Mails Adresse eingeben:

dpkg-reconfigure apticron

Beispiel E-Mail

apticron report [Mon, 17 Jun 2013 07:01:25 +0200] 
======================================================================== 

apticron has detected that some packages need upgrading on: 

     ws01.fast-srv.de  
     [ 2a01:4f8:100:3ffa::1 188.40.59.209 ] 

The following packages are currently pending an upgrade: 

     fail2ban 0.8.4-3+squeeze2 

======================================================================== 

Package Details: 

Reading changelogs... 
--- Changes for fail2ban --- 
fail2ban (0.8.4-3+squeeze2) squeeze-security; urgency=high 

 * Anchor apache- filters failregexes to avoid possible DoS on servers 
   which enabled corresponding jails. Fix cherry-picked from upstream 
   0.8.9-29-g6ccd578 . See http://seclists.org/fulldisclosure/2013/Jun/66 

-- Yaroslav Halchenko <debian@onerussian.com>  Wed, 12 Jun 2013 14:27:07 -0400 

======================================================================== 

You can perform the upgrade by issuing the command: 

     aptitude full-upgrade 

as root on ws01.fast-srv.de 

-- 
apticron