Reconfigure to run out of /app directory

This commit is contained in:
2024-01-23 16:34:37 -06:00
parent d5c553af5a
commit 17107bd7bb
8 changed files with 30 additions and 22 deletions

View File

@@ -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"