3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Fix "No such file or directory" errors in docker-entrypoint.sh.

This commit is contained in:
Michael Stenta 2020-08-11 20:09:09 -04:00
parent e7b55d95ff
commit 0ebb834c82

View file

@ -7,14 +7,14 @@ set -e
# farmOS codebase in /var/farmOS to populate them.
###
# If the /var/www/html directory is empty, copy from /var/farmOS.
if ! [ "$(ls -A /var/www/html/)" ]; then
# If the /var/www/html directory is empty, populate it from pre-built files.
if [ -d /var/www/html ] && ! [ "$(ls -A /var/www/html/)" ]; then
echo "farmOS codebase not detected. Copying from pre-built files in the Docker image."
cp -rp /var/farmOS/. /var/www/html
fi
# If the sites directory is empty, copy from /var/farmOS/web/sites.
if ! [ "$(ls -A /var/www/html/web/sites/)" ]; then
# If the sites directory is empty, populate it from pre-built files.
if [ -d /var/www/html/web/sites ] && ! [ "$(ls -A /var/www/html/web/sites/)" ]; then
echo "farmOS sites directory not detected. Copying from pre-built files in the Docker image."
cp -rp /var/farmOS/web/sites/. /var/www/html/web/sites
fi