Package: moodle
Version: 1.4.4.dfsg.1-3
Severity: minor
Tags: patch

Hi, on installation a default cron file get installed in /etc/cron.d,
containing this line:

*/5 * * * * nobody wget -q -O /dev/null http://localhost/moodle/admin/cron.php

This continues to work even after the package is removed, and adds to the
access log of the web server.  A trivial patch to check for existence of
the php script:

--- postinst.orig       2005-05-30 20:48:25.000000000 +0200
+++ postinst    2005-12-06 23:17:47.000000000 +0100
@@ -112,7 +112,7 @@
     cat > $tempcronfile <<EOF
 #
 # Regular cron jobs for the moodle package
-*/5 * * * * nobody wget -q -O /dev/null 
${protocol}://localhost/moodle/admin/cron.php
+*/5 * * * * nobody [ -f /usr/share/moodle/admin/cron.php ] && wget -q -O 
/dev/null ${protocol}://localhost/moodle/admin/cron.php
 EOF
     ucf $tempcronfile $cronfile
 }

I haven't used ucf yet so I don't know if this is all that's required.

Regards,
Zoran

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.13.4-grsec
Locale: LANG=hr_HR, LC_CTYPE=hr_HR (charmap=ISO-8859-2)

Versions of packages moodle depends on:
ii  apache [httpd]            1.3.33-6sarge1 versatile, high-performance HTTP s
ii  apache2-mpm-prefork [http 2.0.54-5       traditional model for Apache2
ii  debconf [debconf-2.0]     1.4.30.13      Debian configuration management sy
pn  mimetex                                  Not found.
ii  php4                      4:4.3.10-16    server-side, HTML-embedded scripti
ii  php4-cgi                  4:4.3.10-16    server-side, HTML-embedded scripti
pn  php4-gd                                  Not found.
ii  php4-mysql                4:4.3.10-16    MySQL module for php4
ii  wget                      1.9.1-12       retrieves files from the web
pn  wwwconfig-common                         Not found.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to