Add default port in this script.

This commit is contained in:
Hyperling 2025-05-27 11:27:18 -07:00
parent aa20bd67ee
commit 18cd38b194

7
run.sh
View File

@ -41,6 +41,10 @@ while getopts ':p:h' opt; do
esac
done
if [[ -z $ports ]]; then
ports=8080
fi
## Build Environment ##
# Ensure we are executing from this file's directory.
@ -87,9 +91,6 @@ find files/photos/ -name "*".html -print -delete
count=1
http_code=0
port="${ports%% *}"
if [[ -z $port ]]; then
port="8080"
fi
photos_uri=":$port/photos/"
while [[ $http_code != "200" ]]; do
log "Sleeping for '$count' while waiting for $photos_uri to come up."