#!/bin/sh if [ $# = 1 ]; then DRUPAL_SITES_DIR=$1/pathtosite/sites if [ -d "$DRUPAL_SITES_DIR" ]; then cd $DRUPAL_SITES_DIR for SITE in `ls -F | grep /` do FILE=${SITE}settings.php if [ -r "$FILE" ]; then URL=`grep '^\$base_url.*=' $FILE | sed -e "s/^.*http://" -e "s/[';]//g"` if [ "$URL" != "" ]; then wget -O - -q http:$URL/cron.php fi fi done fi fi