Created
September 1, 2021 01:31
-
-
Save hgati/87877b51484b55e6b7c85de20d9a2c19 to your computer and use it in GitHub Desktop.
Website crawling for full page cache warmup
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
#!/usr/bin/env bash | |
## 파라미터가 없으면 종료 | |
if [ "$#" -lt 2 ]; then | |
echo "$# is Illegal number of parameters." | |
echo "Usage: $0 https://www.example.com example.com" | |
exit 1 | |
fi | |
wget \ | |
--delete-after \ | |
--no-directories \ | |
--reject=txt,css,js,jpg,jpeg,gif,png,ico,svg,bmp \ | |
--level=4 \ | |
--recursive \ | |
--domains=$2 \ | |
--exclude-directories=/js/,/media/,/skin/ \ | |
--server-response \ | |
--no-cache \ | |
$1 2>&1 | egrep -i '(^--|x-cache:)' | |
<<COMMENT1 | |
이곳은 주석내용입니다. | |
COMMENT1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Be public