Reconfigure to run out of /app directory
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
source ContainerTools
|
||||
SNAME=${0##*/}
|
||||
WORKDIR="/var/www/pterodactyl"
|
||||
WORKDIR="/app"
|
||||
|
||||
# If DBHOST value is present, pause boot until target container is up.
|
||||
if [ -n "$DBHOST" ]; then
|
||||
@@ -34,10 +34,16 @@ if [ ! -d "/config/storage" ]; then
|
||||
done
|
||||
fi
|
||||
|
||||
# Check for persistent logging directory, create file path if not present.
|
||||
if [ ! -d "/config/log/nginx" ]; then
|
||||
log "Creating log directory."
|
||||
mkdir -p "/config/log/nginx"
|
||||
# Check for persistent Nginx logging directory, create file path if not present.
|
||||
if [ ! -d "/config/logs/nginx" ]; then
|
||||
log "Creating Nginx log directory."
|
||||
mkdir -p "/config/logs/nginx"
|
||||
fi
|
||||
|
||||
# Check for persistent PHP logging directory, create file path if not present.
|
||||
if [ ! -d "/config/logs/php" ]; then
|
||||
log "Creating PHP log directory."
|
||||
mkdir -p "/config/logs/php"
|
||||
fi
|
||||
|
||||
# Check for config file, create template if not present.
|
||||
@@ -62,11 +68,15 @@ if [ "$HTTPS" == "true" ]; then
|
||||
if [ ! -e "/etc/nginx/http.d/pterodactyl.conf" ]; then
|
||||
log "Symlinking Nginx config file for HTTPS"
|
||||
ln -s /defaults/nginx/https.conf /etc/nginx/http.d/pterodactyl.conf
|
||||
else
|
||||
log "HTTPS Nginx config is already in place"
|
||||
fi
|
||||
else
|
||||
if [ ! -e "/etc/nginx/http.d/pterodactyl.conf" ]; then
|
||||
log "Symlinking Nginx config file for HTTP"
|
||||
ln -s /defaults/nginx/http.conf /etc/nginx/http.d/pterodactyl.conf
|
||||
else
|
||||
log "HTTP Nginx config file is already in place"
|
||||
fi
|
||||
fi
|
||||
log "Initialization complete"
|
||||
|
Reference in New Issue
Block a user