Recent Posts

Your browser does not support frame.

Selasa, 01 Oktober 2013

Auto Clear Cache and Restart Squid NT on Windows Batch Script

Ini adalah code batch untuk membersihkan cache proxy squid NT yang di di install di windows
silahkan anda copy paste ke notepad dan simpan dengan ekstensi .bat
jangan lupa mengedit bagian folder cache sesuai path direktory cache di komputer anda :


@ECHO OFF
echo.
echo Clear cache and restart squid-NT proxy
echo.
echo This script coded by jimmi diaz @ 2013 http://kupas.co.nr
echo.

SET /P continue="Ready to clear cache ? (y/n): "
IF %continue% EQU n (
exit
)
IF %continue% EQU N (
exit
)
IF %continue% EQU y (
GOTO myLabel
)
:myLabel
echo.
echo Prepare to stopping squid services.
net stop squid
echo.
cd\
echo.
echo trying to clear squid cache...
echo.
echo stay and relax for a while, clear is in progress
echo.
echo starting clear...

REM change your first squid cache folder bottom of here
rd /s /q f:\SQUIDCACHE
echo.

REM change your second squid cache folder bottom of here
rd /s /q f:\SQUIDCACHE1

echo.
echo clearing squid cache, successfull !
echo.
echo preparing new cache folder
echo.
c:
cd\
cd c:\squid\sbin
squid -z
squid.exe -i
squid.exe -O -D
echo.
echo finish, some new cache folder is ready !
echo.
echo prepare to start  squid service on windows
net start squid
echo.
echo Squid 2.7-stable8 is started right now!!
echo.
echo All Process allready done !
pause


Sekian dulu.
download code here

0 komentar:

Posting Komentar