If you have, would you be willing to share it? I don't want to re-invent the wheel and I'm not the world's greatest bash expert

Code: Select all
# httpdocs
echo "Replacing javascript reference to port 8880 in vhost index.html pages"; echo "Number of matches on $HOSTNAME: `grep -l ":8880/javascript" /var/www/vhosts/*/httpdocs/index.html | wc -l`"; for filename in `grep -l ":8880/javascript" /var/www/vhosts/*/httpdocs/index.html`; do echo $filename; echo "Default index.html" > $filename; done
# legacy httpsdocs
echo "Replacing javascript reference to port 8880 in SSL-vhost index.html pages"; echo "Number of matches on $HOSTNAME: `grep -l ":8880/javascript" /var/www/vhosts/*/httpsdocs/index.html | wc -l`"; for filename in `grep -l ":8880/javascript" /var/www/vhosts/*/httpsdocs/index.html`; do echo $filename; echo "Default index.html" > $filename; done
# remove reference from templates
sed -i 's/8880/80/g' /var/www/vhosts/default/htdocs/index.html
sed -i 's/8880/80/g' /usr/share/plesk-vhost/htdocs/index.html
sed -i 's/8880/80/g' /var/www/vhosts/.skel/0/httpdocs/index.html