Files
docker/hidche/app/entrypoint_hidche_app.sh
T

20 lines
529 B
Bash
Executable File

#!/bin/bash
set -euxo pipefail
shopt -s nullglob
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
printf "[PHP]\ndate.timezone = \"$TZ\"\n" > /usr/local/etc/php/conf.d/tzone.ini
wwwRoot="/var/www/html"
samRoot="$wwwRoot/sam"
imageRoot="$wwwRoot/image"
if [ ! -f "$samRoot/index.php" ]; then
gosu www-data git clone $gameGitPath /var/www/html/sam
fi
if [ $HIDCHE_IMAGE_USE_INTERNAL = "yes" ] && [ ! -d "$imageRoot" ]; then
gosu www-data git clone $imgGitPath /var/www/html/image
fi
exec "$@"