hugo, print out the baseurl to see if there are any issues with passing it to the subjobs.
This commit is contained in:
1 parent
c80f5b55ce
commit
c79e036fa6
2 files changed
+6
No files matched your search
@@ -6,6 +6,8 @@ FORCE="$1"
|
|||||||
BASEURL="$2"
|
BASEURL="$2"
|
||||||
|
|
||||||
echo "*** Running cronjob @ `date` ***"
|
echo "*** Running cronjob @ `date` ***"
|
||||||
|
echo "FORCE=$FORCE"
|
||||||
|
echo "BASEURL=$BASEURL"
|
||||||
|
|
||||||
# Pull any updates, and if the project is already up to date, exit successfully.
|
# Pull any updates, and if the project is already up to date, exit successfully.
|
||||||
git pull | grep -v "up to date"
|
git pull | grep -v "up to date"
|
||||||
@@ -17,7 +19,9 @@ if [[ $status != 0 && -e /var/www/html/index.html && -z $FORCE ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# If the project was not already up to date, build the new files for NGINX.
|
# If the project was not already up to date, build the new files for NGINX.
|
||||||
|
set -x
|
||||||
/usr/local/bin/hugo $BASEURL --gc --minify
|
/usr/local/bin/hugo $BASEURL --gc --minify
|
||||||
|
set +x
|
||||||
status="$?"
|
status="$?"
|
||||||
echo "* Hugo status is '$status', FORCE is '$FORCE'."
|
echo "* Hugo status is '$status', FORCE is '$FORCE'."
|
||||||
if [[ $status == 0 && -e public/index.html ]]; then
|
if [[ $status == 0 && -e public/index.html ]]; then
|
||||||
|
|||||||
@@ -80,7 +80,9 @@ if [[ "$DEV" == "Y"* || "$DEV" == "T"* ]]; then
|
|||||||
echo "* Dev server not detected, starting..."
|
echo "* Dev server not detected, starting..."
|
||||||
cd $SITE
|
cd $SITE
|
||||||
killall hugo 2>/dev/null
|
killall hugo 2>/dev/null
|
||||||
|
set -x
|
||||||
sudo -u www-data hugo server $baseurl -D -F --noBuildLock --bind 0.0.0.0 -p 1380 &
|
sudo -u www-data hugo server $baseurl -D -F --noBuildLock --bind 0.0.0.0 -p 1380 &
|
||||||
|
set +x
|
||||||
fi
|
fi
|
||||||
sleep 30
|
sleep 30
|
||||||
done &
|
done &
|
||||||
|
|||||||
Reference in new issue
Block a user