Commit 46424271 authored by Cameron Carney's avatar Cameron Carney

Updated cron; clearing cache and optimizing on startServer

parent 2d133b84
...@@ -24,8 +24,8 @@ function init { ...@@ -24,8 +24,8 @@ function init {
rm -rf bootstrap/cache rm -rf bootstrap/cache
ln -s /data/cache bootstrap/cache ln -s /data/cache bootstrap/cache
rm .env -rf rm -rf .env
ln -s "/data/pterodactyl.conf" .env ln -s /data/pterodactyl.conf .env
} }
# Runs the initial configuration on every startup # Runs the initial configuration on every startup
...@@ -35,6 +35,7 @@ function startServer { ...@@ -35,6 +35,7 @@ function startServer {
if [ ! -e "/data/pterodactyl.conf" ]; then if [ ! -e "/data/pterodactyl.conf" ]; then
echo "Running first time setup..." echo "Running first time setup..."
# Generate base template
touch /data/pterodactyl.conf touch /data/pterodactyl.conf
echo "##" > /data/pterodactyl.conf echo "##" > /data/pterodactyl.conf
echo "# Generated on:" $(date +"%B %d %Y, %H:%M:%S") >> /data/pterodactyl.conf echo "# Generated on:" $(date +"%B %d %Y, %H:%M:%S") >> /data/pterodactyl.conf
...@@ -49,8 +50,8 @@ function startServer { ...@@ -49,8 +50,8 @@ function startServer {
sleep 5 sleep 5
# Clean out everything # Clean out everything
php artisan config:cache php artisan config:cache -q
php artisan optimize php artisan optimize -q
echo "" echo ""
echo "Generating key..." echo "Generating key..."
...@@ -62,11 +63,13 @@ function startServer { ...@@ -62,11 +63,13 @@ function startServer {
sleep 1 sleep 1
php artisan migrate --force php artisan migrate --force
php artisan db:seed --force php artisan db:seed --force
php artisan config:cache
php artisan optimize
fi fi
# Clear config cache and optimize on every startup
php artisan config:cache -q
php artisan optimize -q
# Allows Users to give MySQL/cache sometime to start up.
if [[ "${STARTUP_TIMEOUT}" -gt "0" ]]; then if [[ "${STARTUP_TIMEOUT}" -gt "0" ]]; then
echo "Starting Pterodactyl ${PANEL_VERSION} in ${STARTUP_TIMEOUT} seconds..." echo "Starting Pterodactyl ${PANEL_VERSION} in ${STARTUP_TIMEOUT} seconds..."
sleep ${STARTUP_TIMEOUT} sleep ${STARTUP_TIMEOUT}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment