Package: drupal7
Version: 7.22-2
Severity: normal
Tags: patch

Dear Maintainer,

I am running into troubles with the current cron shell script. There are
basically two issues:

1) I redirect all my traffic from http to https using a self-signed
certificate. Curl complains about this and does not execute the http request.
2) I use a multisite installation without any "default" site. The cron script
insist in calling the default configuration generating also errors.

I propose the following script solving the issues.




#!/bin/sh

for site in /etc/drupal/7/sites/* ; do
        BASE_URL=""
        CRON_KEY=""
        FULL_URL=""

        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/cronkey.php $site/settings.php; do
                        [ -f "$file" ] && CRON_KEY=`grep '^$cron_key' $file |
cut -d"'" -f2`
                        [ "X$CRON_KEY" != "X" ] && break
                done

                if [ "X$BASE_URL" = "X" ] ; then
                        if [ -f "$site/settings.php" ]; then
                                BASE_URL='http://localhost/drupal7'
                        else
                                break
                        fi
                fi

                if [ "X$CRON_KEY" = "X" ] ; then
                        FULL_URL="$BASE_URL/cron.php"
                else
                        FULL_URL="$BASE_URL/cron.php?cron_key=$CRON_KEY"
                fi

                if curl -S --fail --silent --compressed --insecure --location
$FULL_URL ; then
                        # Success!
                        true
                else
                        echo "Error running the periodic maintenance for $site:
CURL exit code $?"
                        echo "Requested URL: $FULL_URL"
                fi
        fi
done





-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (800, 'testing'), (40, 'unstable'), (30, 'stable'), (20, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.9-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages drupal7 depends on:
ii  apache2                                    2.2.22-13
ii  apache2-mpm-prefork [httpd]                2.2.22-13
ii  curl                                       7.31.0-2
ii  dbconfig-common                            1.8.47+nmu1
ii  debconf [debconf-2.0]                      1.5.50
ii  exim4-daemon-heavy [mail-transport-agent]  4.80-7
ii  php5                                       5.4.4-15.1
ii  php5-gd                                    5.4.4-15.1
ii  php5-pgsql                                 5.4.4-15.1
ii  postgresql-client                          9.3+142really9.1+145
ii  postgresql-client-9.1 [postgresql-client]  9.1.9-2+b1
ii  wwwconfig-common                           0.2.2

Versions of packages drupal7 recommends:
ii  postgresql  9.3+142really9.1+145

drupal7 suggests no packages.

-- Configuration Files:
/etc/drupal/7/sites/default/settings.php [Errno 2] No such file or directory: 
u'/etc/drupal/7/sites/default/settings.php'

-- debconf information:
  drupal7/pgsql/changeconf: false
  drupal7/dbconfig-remove:
  drupal7/pgsql/authmethod-user:
  drupal7/db/basepath:
  drupal7/upgrade-error: abort
* drupal7/dbconfig-install: true
  drupal7/purge: false
  drupal7/upgrade-backup: true
  drupal7/pgsql/manualconf:
* drupal7/database-type: mysql
  drupal7/internal/reconfiguring: false
  drupal7/install-error: abort
  drupal7/remote/port:
  drupal7/remove-error: abort
  drupal7/mysql/admin-user: root
  drupal7/pgsql/admin-user: postgres
  drupal7/missing-db-package-error: abort
  drupal7/dbconfig-upgrade: true
  drupal7/remote/host:
  drupal7/db/app-user: drupal7
  drupal7/pgsql/authmethod-admin: ident
  drupal7/db/dbname: drupal7
  drupal7/pgsql/no-empty-passwords:
  drupal7/internal/skip-preseed: false
  drupal7/passwords-do-not-match:
  drupal7/dbconfig-reinstall: false
  drupal7/mysql/method: unix socket
  drupal7/pgsql/method: unix socket
  drupal7/remote/newhost:


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to