Monday, September 21, 2009

Hack cron bash script to keep specific URLS in the cache

script to "touch urls" so that they stay in the cache of a caching proxy. the urls are contained one on each line in a file called URLS.conf

[root@cms ~]# vi /root/touch_urls-www1.sh

#!/bin/bash

for i in `cat URLs.conf`
do curl -H "Host: www.refinery29.com" http://127.0.0.1$i -s >> /dev/null
done


Here is the URLS.conf:

[root@cms ~]# vi /root/URLs.conf

/index.php
/about.php
/contact.php

0 Comments:

Post a Comment

<< Home