Last active
August 29, 2015 13:57
-
-
Save magenx/9604368 to your computer and use it in GitHub Desktop.
Clear apc cache
This file contains hidden or 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 | |
myip=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4) | |
## monitor app folder and clear apc/opcode cache | |
/usr/bin/inotifywait -e modify \ | |
-mrq /var/www/html/magento/app | while read line; do | |
echo -n "$line " >> /var/log/app_monitor.log | |
echo `date | cut -d " " -f1-4` >> /var/log/app_monitor.log | |
wget -O /dev/null http://$myip/apc_opcache/apc_clear.php >/dev/null 2>&1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment