L'heure d'envoi des logs ne fonctionne pas

Bonjour je n’arrive pas à configurer l’heure d’envoi des logs avec logwatch, pourtant j’ai mis ceci dans le fichier : /etc/cron.daily/00logwatch : [code]#!/bin/bash

#Check if removed-but-not-purged
test -x /usr/share/logwatch/scripts/logwatch.pl || exit 0

#execut
/usr/sbin/logwatch --mailto mon addresse@.com
#Note: It’s possible to force the recipient in above command
#Just pass --mailto address@a.com instead of --output mail
16 15 * * * root logwatch --detail High --mailto addresse@.com
[/code]
Je me suis basé sur ce tuto http://sheebypanda.com/logwatch/#more-549
Merci.

Bonjour,

Je te conseillerai tout d’abord d’enlever ton adresse mail de ton post afin d’éliminer d’éventuels spammeurs de joué avec…
logwatch devrait générer ses propres logs, que disent-ils ?

Cdlt,

Salut,

[quote=“Clochette”]En générale il se retrouve facilement dans le crontab sur les installation que je gère, mais maintenant il est tout à fait possible de le mettre dans le contab.daily.

Pour un envoi par exemple tous les jours à 9H :

As-tu vérifier la configuration de ton logwatch et fouillé toutes les crontab ?[/quote]

modifier-heure-journaliere-logwatch-t44498.html#p447527

Ok je teste et je vous donne des nouvelles demain.
Merci

Bon ben ça ne fonctionne pas. :013
J’ai ceci dans /var/mail/ : Mail delivery failed: returning message to sender

/etc/cron.daily/00logwatch: /etc/cron.daily/00logwatch: line 10: 16: command not found run-parts: /etc/cron.daily/00logwatch exited with return code 127

Salut,

ligne 10 & 16

Ok mais je vois pas le problème !

[code]cat /etc/cron.daily/00logwatch
#!/bin/bash

#Check if removed-but-not-purged
test -x /usr/share/logwatch/scripts/logwatch.pl || exit 0

#execut
/usr/sbin/logwatch --mailto jerome.marecaille@gmail.com
#Note: It’s possible to force the recipient in above command
#Just pass --mailto address@a.com instead of --output mail
18 * * * root logwatch --detail med --mailto addresse@.com
[/code]

Quelles sont les lignes 10 et 16? On ne les repères pas sur ton fichier

Je sais pas j’ai que ça dans le fichier, quand je tape: logwatch --mailto addresse@.com, je ne reçois rien.

La réponse est ici http://www.debian-fr.org/modifier-heure-journaliere-logwatch-t44498.html

Les heures des tâches cron se trouvent dans /etc/crontab.

On peut modifier les cron.daily, weekly, monthly, dans ton cas, modifie la ligne cron.daily puisque logwatch s’y trouve

Pas d’espace ? Pas de tabulation après cette dernière ligne ?

ps: il me semble que cela fonctionne pour ricardo et Clochette.

#execute /usr/sbin/logwatch --output mail

Manuellement en root.

$ ls -lu /etc/cron.daily/ -rwxr-xr-x 1 root root 364 août 22 19:20 00logwatch -rwxr-xr-x 1 root root 311 août 22 16:58 0anacron -rwxr-xr-x 1 root root 14985 août 22 16:58 apt -rwxr-xr-x 1 root root 314 août 22 16:58 aptitude -rwxr-xr-x 1 root root 355 août 22 16:58 bsdmainutils -rwxr-xr-x 1 root root 256 août 22 16:58 dpkg -rwxr-xr-x 1 root root 4125 août 22 16:58 exim4-base -rwxr-xr-x 1 root root 89 août 22 16:58 logrotate -rwxr-xr-x 1 root root 1365 août 22 16:58 man-db -rwxr-xr-x 1 root root 606 août 22 16:58 mlocate -rwxr-xr-x 1 root root 249 août 22 16:59 passwd