Skip to content

Instantly share code, notes, and snippets.

View Igcorreia's full-sized avatar
💡
Finding new Challenges

Ignacio Correia Igcorreia

💡
Finding new Challenges
View GitHub Profile
@Igcorreia
Igcorreia / restart-service.sh
Created March 17, 2021 19:12 — forked from fer-ri/restart-service.sh
Auto Restart PHP5-FPM When Down or Bad Gateway
#!/bin/bash
if curl --head -sf http://yourdomain.com/some-script.php -o /dev/null; then
echo "PHP FPM is up"
else
service php5-fpm restart && service nginx restart && service mysql restart
echo "Opps .. service was down" | mail -s "PHP-FPM Service Down" [email protected] -aFrom:[email protected]
fi
@Igcorreia
Igcorreia / magento-permission.sh
Created October 14, 2020 11:41
Resetting File & Folder Permissions Magento 1.9 & 2.3
# Setting up permission on Magento 1.9
# set all directories and subdirectories from the application to 775
# set all files to 644
# set directory app/etc/, var/, media/ and all its files and subdirectories to 777
cd <your Magento install dir>
find . -type d -exec chmod 775 {} \;
find . -type f – exec chmod 644 {} \;
chmod 777 -R app/etc/