Initial Commit
This commit is contained in:
Executable
+28
@@ -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 "$@"
|
||||
Reference in New Issue
Block a user