mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-27 07:31:40 +01:00
25 lines
602 B
Bash
25 lines
602 B
Bash
#!/bin/bash
|
|
# This script sets up the
|
|
|
|
if [ ! -f /config/speed.db ]; then
|
|
echo "Database file not found!"
|
|
echo "Creating the database..."
|
|
touch /config/speed.db
|
|
fi
|
|
|
|
if cat /app/site/.env | grep -E "APP_KEY=base64" > /dev/null; then
|
|
echo "App key found. Skipping app key generation"
|
|
else
|
|
echo "No app key found. Generating app key"
|
|
cd /app/site && php artisan key:generate
|
|
fi
|
|
|
|
cd /app/site && php artisan migrate
|
|
|
|
cd /config
|
|
mkdir -p logs
|
|
|
|
chown -R application /config
|
|
chmod 775 -R /config
|
|
|
|
echo "* * * * * cd /app/site/ && php artisan schedule:run >> /dev/null 2>&1" | crontab - |