inception/srcs/requirements/wordpress/run.sh
2025-06-13 12:26:40 +02:00

34 lines
589 B
Bash
Executable file

#!/bin/sh
set -e
echo
dirisempty()
{
[ -z "$( ls -A "$1" )" ]
}
if dirisempty /www
then
echo "download and uncompress wordpress release..."
echo
apk add curl
apk fix
rm -rf /build
mkdir -p "/build/www/"
curl https://wordpress.org/latest.tar.gz | tar zx -C /build/www
chmod -R 777 /www
mv $(find /build/www/wordpress -maxdepth 1 -mindepth 1) /www
rm -rf /build
echo
echo "add files from /conf/wwwmore/"
echo
cp -r /conf/wwwmore/. /www
echo "www directory created!"
echo
fi
echo "to recreate the www directory, remove the www volume of this compose."
echo
php-fpm83 -F