Skip to content

Instantly share code, notes, and snippets.

@tibu
Forked from cebe/phpmailer.sh
Last active December 28, 2016 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tibu/9b43b4cf4dd8d4f80c962f2a4603d266 to your computer and use it in GitHub Desktop.
Save tibu/9b43b4cf4dd8d4f80c962f2a4603d266 to your computer and use it in GitHub Desktop.
command for finding phpmailer files and line of code and change it to the latest version
#!/bin/bash
wget https://raw.githubusercontent.com/PHPMailer/PHPMailer/master/class.phpmailer.php
for file in $(find /var/www/ -name 'class.phpmailer.php' -print) ; do
echo $file
cp $file $file.bak
cp ./class.phpmailer.php $file
# dir=$(dirname $file)
# chown $(stat -c '%U' $dir):$(stat -c '%G' $dir) $file
done
@tibu
Copy link
Author

tibu commented Dec 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment