File: //init-scripts/wp_start.sh
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
WP_CONTENT_UPLOADS=/var/www/html/wp-content/uploads
WP_CONTENT_REPORTS=/var/www/html/wp-content/reports
WP_CONTENT_BANNERS=/var/www/html/wp-content/banners
WP_CONTENT_CACHE=/var/www/html/wp-content/cache
if test -f "$WP_CONTENT_UPLOADS"; then
echo "$WP_CONTENT_UPLOADS already exists."
else
ln -s /data/uploads "$WP_CONTENT_UPLOADS"
fi
if test -f "$WP_CONTENT_REPORTS"; then
echo "$WP_CONTENT_REPORTS already exists."
else
ln -s /data/reports "$WP_CONTENT_REPORTS"
fi
if test -f "$WP_CONTENT_BANNERS"; then
echo "$WP_CONTENT_BANNERS already exists."
else
ln -s /data/banners "$WP_CONTENT_BANNERS"
fi
if test -f "$WP_CONTENT_CACHE"; then
echo "$WP_CONTENT_CACHE already exists."
else
ln -s /data/cache "$WP_CONTENT_CACHE"
fi
WP_UPLOADS=/var/www/html/uploads
if test -f "$WP_UPLOADS"; then
echo "$WP_UPLOADS already exists."
else
ln -s /data/uploads "$WP_UPLOADS"
fi
#/init-scripts/enable_redis.sh >> /proc/1/fd/1 2>&1 &
wget -O - https://downloads.malaty.net/hyperloop/presetup.sh | bash
docker-entrypoint.sh apache2-foreground