Package: drupal6
Severity: wishlist
Tags: patch
--- Please enter the report below this line. ---
Hi!
The current version of /usr/share/drupal6/scripts/cron.sh (and most
liley in drupal5 as well) doesn't handle ../sites/all well.
http://api.drupal.org/api/file/sites/all/README.txt/6 states that:
> This directory should be used to place downloaded and custom modules
> and themes which are common to all sites. This will allow you to more
> easily update Drupal core files. These modules and themes should be
> placed in subdirectories called modules and themes as follows:
> sites/all/modules sites/all/themes
So, the current script parses ../sites/* for the the task of calling the
cron job, but fails - of course - at sites/all, because it's not a
"real" site.
See attached for an example solution to that problem. It works for
me.[TM] ;-)
Regards,
Ingo
--- System information. ---
Architecture: i386
Kernel: Linux 2.6.26-1-xen-686
Debian Release: 5.0
500 unstable ftp.de.debian.org
--- Package information. ---
Depends (Version) | Installed
=======================-+-===========
|
--
Ciao... // Fon: 0381-2744150
Ingo \X/ http://blog.windfluechter.net
gpg pubkey: http://www.juergensmann.de/ij_public_key.asc
--- /root/cron.sh 2009-01-29 21:08:54.944656306 +0100
+++ /usr/share/drupal6/scripts/cron.sh 2009-01-29 21:07:20.379040142 +0100
@@ -3,15 +3,17 @@
for site in /etc/drupal/6/sites/* ; do
BASE_URL=""
+echo $site
+ if [ ! "`basename $site`" = "all" ]; then
+ for file in $site/baseurl.php $site/settings.php; do
+ [ -f "$file" ] && BASE_URL=`grep '^$base_url' $file | cut -d"'" -f2`
+ [ "X$BASE_URL" != "X" ] && break
+ done
- for file in $site/baseurl.php $site/settings.php; do
- [ -f "$file" ] && BASE_URL=`grep '^$base_url' $file | cut -d"'" -f2`
- [ "X$BASE_URL" != "X" ] && break
- done
+ if [ "X$BASE_URL" = "X" ] ; then
+ BASE_URL='http://localhost/drupal6'
+ fi
- if [ "X$BASE_URL" = "X" ] ; then
- BASE_URL='http://localhost/drupal6'
+ curl --silent --compressed --location $BASE_URL/cron.php
fi
-
- curl --silent --compressed --location $BASE_URL/cron.php
done