diff --git a/run b/run index cac46d2..957c964 100755 --- a/run +++ b/run @@ -3,7 +3,7 @@ RDIR=$(cd $(dirname $(readlink -f "$0")) >/dev/null 2>&1 ; pwd -P) # source any environment for particular site shopt -s extglob -ENV_FILE=$(ls $RDIR/sites/${1}* 2> /dev/null | grep -v '.off$\|.example$\|.tmpl$\|.template$') +ENV_FILE=$(ls $RDIR/sites/${1}* 2> /dev/null | grep -v '.off$\|.tmpl$\|.template$') if [[ $ENV_FILE ]]; then source $ENV_FILE @@ -20,6 +20,8 @@ HUGO=${HUGO:-$(command -v hugo)} PORT=${PORT:-8096} 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 +mkdir -p $DATA_DIR +# start hugo in the data directory (needed for git module) cd $DATA_DIR ls -la CMD="$HUGO server