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

13 lines
350 B
Bash

#!/bin/bash
set -e
# If the sites directory is empty, copy from /tmp/sites.
if ! [ "$(ls -A /var/www/html/sites/)" ]; then
echo "farmOS sites directory not detected. Copying from pre-built codebase in the Docker image."
cp -rp /tmp/sites/. /var/www/html/sites
fi
# Execute the arguments passed into this script.
echo "Attempting: $@"
exec "$@"