경로 이동

This commit is contained in:
2019-09-15 14:32:31 +00:00
parent bfb489f007
commit 2b69312463
16 changed files with 4 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/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
if [[ "$imageRoot" =~ ^ssh ]]; then
query=`echo "<?php \\\$a=parse_url('$imageRoot');echo join(' ', [\\\$a['port']?'-p '.\\\$a['port']:'',\\\$a['host']]);" | php`
ssh-keyscan $query >> /var/www/.ssh/known_hosts 2>/dev/null;
chown www-data:www-data /var/www/.ssh/known_hosts
chmod 600 /var/www/.ssh/known_hosts
fi
gosu www-data git clone $imgGitPath /var/www/html/image
fi
exec "$@"