docker-scripts/linux/ecosystem/nginx/1.27.0/main/docker-entrypoint.sh

17 lines
530 B
Bash
Raw Normal View History

2024-07-27 18:47:35 +03:00
#!/bin/bash
if [[ -z "${FIX_WWW_DATA}" ]]; then
echo "[nginx] env FIX_WWW_DATA is not set. Skipping..."
elif [ "${FIX_WWW_DATA}" == "false" ]; then
echo "[nginx] env FIX_WWW_DATA is set to false. Skipping..."
elif [ "${FIX_WWW_DATA}" == "true" ]; then
echo "[nginx] Changing permissions for /var/www path. Dont worry, please wait."
chown www-data:www-data /var/www -R
echo "[nginx] Done"
else
echo "[nginx] env FIX_WWW_DATA is set to strange value. Skipping..."
fi
echo "[nginx] Starting up"
nginx -g 'daemon off;'