Skip to content

Instantly share code, notes, and snippets.

@magenx magenx/gist:9604368
Last active Aug 29, 2015

Embed
What would you like to do?
Clear apc cache
#!/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
You can’t perform that action at this time.