Active les mails de cron

This commit is contained in:
Alan Garcia 2012-08-22 07:42:17 +00:00
parent 254e7d7bad
commit 825bdddc51
2 changed files with 4 additions and 3 deletions

2
debian/control vendored
View File

@ -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

View File

@ -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))