Use the www-data user rather than creating a hugo user.

This commit is contained in:
2025-08-17 11:26:47 -07:00
parent 4dd0661e1e
commit cfb07a6e93
3 changed files with 6 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ typeset -u DEV
echo "DEV=$DEV"
echo "*** Creating Git Repo ***"
sudo -u hugo git clone --recurse-submodules $REPO /var/www/hugo/site
sudo -u www-data git clone --recurse-submodules $REPO /var/www/hugo/site
status="$?"
echo "*** Validating Git Repo ***"
@@ -25,7 +25,7 @@ echo "* Site exists!"
echo "*** Copying Static Files to NGINX ***"
rm -rfv /var/www/html/*
sudo -u hugo /var/www/hugo/cronjob.sh
sudo -u www-data /var/www/hugo/cronjob.sh
echo "*** Starting Cron ***"
service cron start
@@ -58,7 +58,7 @@ if [[ "$DEV" == "Y"* || "$DEV" == "T"* ]]; then
echo "* Dev server not detected, starting..."
cd /var/www/hugo/site
killall hugo 2>/dev/null
sudo -u hugo hugo server -D --noBuildLock --bind 0.0.0.0 -p 1380 &
sudo -u www-data hugo server -D --noBuildLock --bind 0.0.0.0 -p 1380 &
fi
sleep 30
done &