All pastes #764711 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-11-07 14:30 UTC
rendered paste body
#!/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