fix: run creates the files directory if it doesn't exist. .example files can be run
parent
42dedabba9
commit
92cb1f48c5
4
run
4
run
|
@ -3,7 +3,7 @@
|
||||||
RDIR=$(cd $(dirname $(readlink -f "$0")) >/dev/null 2>&1 ; pwd -P)
|
RDIR=$(cd $(dirname $(readlink -f "$0")) >/dev/null 2>&1 ; pwd -P)
|
||||||
# source any environment for particular site
|
# source any environment for particular site
|
||||||
shopt -s extglob
|
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
|
if [[ $ENV_FILE ]]; then
|
||||||
source $ENV_FILE
|
source $ENV_FILE
|
||||||
|
@ -20,6 +20,8 @@ HUGO=${HUGO:-$(command -v hugo)}
|
||||||
PORT=${PORT:-8096}
|
PORT=${PORT:-8096}
|
||||||
echo site files in $DATA_DIR 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
|
# [[ $(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
|
cd $DATA_DIR
|
||||||
ls -la
|
ls -la
|
||||||
CMD="$HUGO server
|
CMD="$HUGO server
|
||||||
|
|
Loading…
Reference in New Issue