diff --git a/run b/run index e9262de..98f4971 100755 --- a/run +++ b/run @@ -15,15 +15,16 @@ else echo warning no environoment file set for $1 in $RDIR/sites fi DATA_DIR=${DATA_DIR:-${HOME}/.local/hugo} +DATA_DIR=${DATA_DIR}/${1}$([[ $DATA_SUB_DIR ]] && echo "/$DATA_SUB_DIR") HUGO=${HUGO:-$(command -v hugo)} PORT=${PORT:-8096} -echo site files in $DATA_DIR/$1 listening on port $PORT +echo site files in $DATA_DIR listening on port $PORT # [[ $(netstat -tulpn | grep LISTEN | grep 0.0.0.0:$PORT) ]] && echo tcp port $PORT is busy can not start hugo server && exit CMD="$HUGO server $([[ $BASE_URL = "https://"* ]] && echo " --liveReloadPort 443") --bind 0.0.0.0 --themesDir $RDIR/themes ---source $DATA_DIR/$1 +--source $DATA_DIR --port $PORT --appendPort=$([[ $REVERSE_PROXY = true ]] && echo false || echo true) --baseURL ${BASE_URL:-localhost}