Automatically reload the /photos/
index files.
This commit is contained in:
parent
6fd8525dad
commit
add3a2865c
10
run.sh
10
run.sh
@ -78,6 +78,16 @@ npm install
|
|||||||
# Reset generated index files.
|
# Reset generated index files.
|
||||||
echo "`date` - Removing old index files."
|
echo "`date` - Removing old index files."
|
||||||
find files/photos/ -name "*".html -print -delete
|
find files/photos/ -name "*".html -print -delete
|
||||||
|
{
|
||||||
|
http_code=0
|
||||||
|
while [[ $http_code != "200" ]]; do
|
||||||
|
sleep 1
|
||||||
|
echo "`date` - Checking if /photos/ is ready yet."
|
||||||
|
http_code="`curl --silent --fail --w '\n%{http_code}' localhost:8080/photos | tail -n 1`"
|
||||||
|
echo "`date` - Check for /photos/ responded with '$http_code'."
|
||||||
|
done
|
||||||
|
echo "`date` - Finished loading /photos/."
|
||||||
|
} &
|
||||||
|
|
||||||
## Main ##
|
## Main ##
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user