Created
October 1, 2009 07:48
-
-
Save tobiassjosten/198813 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# drupal-cron - a shell script for running cron.php on Drupal installations. | |
SITES=$(grep -r 'ServerName' /etc/apache2/sites-enabled/) | |
for site in $SITES ; do | |
if [[ "$site" == ServerName || "$site" =~ /etc/apache2/sites-enabled/* ]]; then | |
continue | |
fi | |
site=$(expr match "$site" '\([^:]*\)'); | |
wget -q -O /dev/null --header="Host: $site" http://127.0.0.1/cron.php | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment