| Server IP : 164.138.27.172 / Your IP : 216.73.216.143 Web Server : nginx/1.27.4 System : Linux cookingdream 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64 User : www-adm ( 1001) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /home/jonasn/dev/digitala-lektioner/provision/ |
Upload File : |
#!/bin/bash
# Init script for a development site with a monolithic Git repo
# v1.0
# Edit these variables to suit your porpoises
# -------------------------------------------
# Just a human readable description of this site
SITE_NAME="Digitala lektioner"
# The name (to be) used by MySQL for the DB
DB_NAME="diglek"
export ACF_PRO_KEY="b3JkZXJfaWQ9Nzg5OTV8dHlwZT1kZXZlbG9wZXJ8ZGF0ZT0yMDE2LTA0LTA2IDExOjU5OjU4"
echo "---------------------------"
echo "Commencing $SITE_NAME setup"
# Make a database, if we don't already have one
mysql -u root --password=root -e "CREATE DATABASE IF NOT EXISTS $DB_NAME; GRANT ALL PRIVILEGES ON $DB_NAME.* TO wp@localhost IDENTIFIED BY 'wp';"
if [[ ! -d "${VVV_PATH_TO_SITE}/www/wp" ]]; then
cd ${VVV_PATH_TO_SITE}/
echo "Copy default .env"
cp -n ${VVV_PATH_TO_SITE}/provision/.env ${VVV_PATH_TO_SITE}/
noroot composer install
cd ${VVV_PATH_TO_SITE}/www/wp
if ! $(noroot wp core is-installed); then
pwd
noroot wp core install --url=https://vvv.diglek.test --title="Digitala lektioner dev" --admin_name="admin" --admin_email="admin@local.dev" --admin_password="admin"
noroot wp theme activate digitala-lektioner
cd ${VVV_PATH_TO_SITE}/www/app/themes/digitala-lektioner
fi
# Activate plugins
noroot wp plugin activate advanced-custom-fields-pro gravityforms yet-another-related-posts-plugin nginx-helper query-monitor relevanssi-premium
# Create js and css
cd ${VVV_PATH_TO_SITE}/
make
fi
echo "$SITE_NAME init is complete";