Created
September 20, 2011 12:31
-
-
Save byronrode/1228974 to your computer and use it in GitHub Desktop.
Update TimThumb across your Server
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
#!/bin/bash | |
# Fix TimThumb | |
# The following will replace any versions of timthumb.php or thumb.php across your server. | |
# Change the folder to match your server's setup. | |
# If you have made any modifications, or have any additional allowed hosts in your current | |
# TimThumb file they will be updated, so make sure you have those changes backed up. | |
wget -q -O /tmp/new_timthumb.php http://timthumb.googlecode.com/svn/trunk/timthumb.php | |
find /var/www/vhosts/ -name "thumb.php" -exec bash -c "echo Replacing file {} && cp /tmp/new_timthumb.php {}" \; | |
find /var/www/vhosts/ -name "timthumb.php" -exec bash -c "echo Replacing file {} && cp /tmp/new_timthumb.php {}" \; | |
echo "All files updated." | |
rm /tmp/new_timthumb.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment