38 lines
757 B
Bash
Executable file
38 lines
757 B
Bash
Executable file
#!/bin/sh
|
|
set -e
|
|
|
|
echo
|
|
|
|
dirisempty()
|
|
{
|
|
[ -z "$( ls -A "$1" )" ]
|
|
}
|
|
|
|
if ! [ -f /www/.installed ]
|
|
then
|
|
echo "clean..."
|
|
rm -rf -- $(find /www -mindepth 1 -maxdepth 1)
|
|
echo
|
|
|
|
echo "download and uncompress wordpress release..."
|
|
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
|
|
>/www/.installed echo "if this file exists, that means the database is entirely installed."
|
|
echo "www directory created!"
|
|
echo
|
|
fi
|
|
|
|
echo "to recreate the www directory, remove the www volume of this compose."
|
|
echo
|
|
|
|
php-fpm83 -F
|