From 825bdddc5158dc5d215aab8c698daf6a5b0391ad Mon Sep 17 00:00:00 2001 From: Alan Garcia Date: Wed, 22 Aug 2012 07:42:17 +0000 Subject: [PATCH] Active les mails de cron --- debian/control | 2 +- src/cron_users_doit.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index 755d81b8..72b12fee 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,7 @@ Standards-Version: 3.9.1 Package: alternc Architecture: all Pre-depends: debconf (>= 0.5.00) | debconf-2.0 -Depends: debianutils (>= 1.13.1), apache2-mpm-itk, libapache2-mod-php5, php5-mysql, phpmyadmin, postfix, proftpd-mod-mysql, proftpd-basic, squirrelmail, squirrelmail-locales, bind9, wget, rsync, quota, ca-certificates, locales, perl-suid, perl, postfix-mysql, wwwconfig-common, sasl2-bin, fam | gamin, libsasl2-modules, php5-cli, lockfile-progs (>= 0.1.9), gettext (>= 0.10.40-5), sudo, adduser, mysql-client, dnsutils, bash, acl, dovecot-common (>= 1:1.2.15), dovecot-imapd, dovecot-pop3d,vlogger +Depends: debianutils (>= 1.13.1), apache2-mpm-itk, libapache2-mod-php5, php5-mysql, phpmyadmin, postfix, proftpd-mod-mysql, proftpd-basic, squirrelmail, squirrelmail-locales, bind9, wget, rsync, quota, ca-certificates, locales, perl-suid, perl, postfix-mysql, wwwconfig-common, sasl2-bin, fam | gamin, libsasl2-modules, php5-cli, lockfile-progs (>= 0.1.9), gettext (>= 0.10.40-5), sudo, adduser, mysql-client, dnsutils, bash, acl, dovecot-common (>= 1:1.2.15), dovecot-imapd, dovecot-pop3d, vlogger, mailx Recommends: mysql-server(>= 5.0), dovecot-managesieved, dovecot-sieve, dovecot-mysql, ntp Conflicts: alternc-admintools, alternc-awstats (< 1.0), alternc-webalizer (<= 0.9.4), alternc-mailman (< 2.0), courier-authdaemon Provides: alternc-admintools diff --git a/src/cron_users_doit.sh b/src/cron_users_doit.sh index 1b71dd79..7c7a5795 100755 --- a/src/cron_users_doit.sh +++ b/src/cron_users_doit.sh @@ -23,6 +23,8 @@ for CONFIG_FILE in \ . "$CONFIG_FILE" done +from="noreply@$FQDN" + if [ "x$url" == "x" ] ; then echo Missing arguments exit 0 @@ -52,8 +54,7 @@ if [ ! "x$user" == "x" -a ! "x$password" == "x" ]; then params="--http-user=\"$(urldecode $user)\" --http-password=\"$(urldecode $password)\"" fi -echo wget -O - $params "$(urldecode $url)" --timeout=$timeout -# FIXME envoie de mail pour le "rapport d'execution" +wget -O - $params "$(urldecode $url)" --timeout=$timeout | mailx -s "AlternC Cron $id - Report $date" -r "$from" "$email" # On calcule l'heure de la prochaine execution idéale ((interval=$schedule * 60))