Initial Commit

This commit is contained in:
2019-09-14 23:57:48 +00:00
commit 0d49729c63
11 changed files with 1089 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/bin/bash
set -euxo pipefail
shopt -s nullglob
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
wwwRoot="/var/www/html"
samRoot="$wwwRoot/sam"
imageRoot="$wwwRoot/image"
gameGitPath="https://storage.hided.net/gogs/devsam/core.git"
imgGitPath="https://storage.hided.net/gogs/devsam/image.git"
if [ ! -f "$wwwRoot/index.php" ]; then
echo "<?php header('location:sam',TRUE,301);" > $wwwRoot/index.php
chown www-data:www-data $wwwRoot/index.php
fi
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 "$@"