Package: drupal5
Version: 5.10-1
Severity: normal
Tags: patch

Hi

the cron script _still_ does more work than needed within multi side
configuration.

If you have configured several sites and have also non-site
directories like /etc/drupal/5/sites/all and /etc/drupal/5/sites/default
then the script /usr/share/drupal5/scripts/cron.sh will try to curl the
all and default 'sites' using the default localhost BASE_URL which normally
won't
work or which normally does double work.

Regards,
Gebhard

--- cron.sh.2008-08-19  2008-06-02 19:30:42.000000000 +0200
+++ cron.sh     2008-07-27 20:04:12.000000000 +0200
@@ -1,22 +1,16 @@
 #!/bin/sh
-# $Id: cron.sh 1887 2008-06-02 17:30:41Z luigi $
-
-BASE_URL=""
-
+# $Id: cron.sh 1878 2008-02-12 10:56:45Z luigi $
 for site in /etc/drupal/5/sites/* ; do
-       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/drupal5'
-       fi
-
-       curl --silent --compressed --location $BASE_URL/cron.php
+   BASE_URL=""
+   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
+   curl --silent --compressed --location $BASE_URL/cron.php
 done

 # no site found with base_url - fall back to localhost (only once)
 if [ "X$BASE_URL" = "X" ] ; then
    curl --silent --compressed --location http://localhost/drupal5/cron.php
 fi
+






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

Reply via email to