Skip to content

Commit

Permalink
debug script mods
Browse files Browse the repository at this point in the history
  • Loading branch information
diosmosis committed Dec 23, 2024
1 parent adb4baf commit 0f72e64
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions scripts/local-dev-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ function install_wordpress() {
echo "wordpress $WORDPRESS_VERSION already installed at /var/www/html/$WORDPRESS_FOLDER/."
fi

echo "waiting for database..."
sleep 5 # wait for database
echo "done."

# if requested, drop the database for a clean install (used mainly for automated tests)
if [[ ! -z "$RESET_DATABASE" ]]; then
echo "dropping existing database..."
Expand Down Expand Up @@ -511,6 +507,8 @@ EOF
find "/var/www/html/$WORDPRESS_FOLDER" -path "/var/www/html/$WORDPRESS_FOLDER/wp-content/plugins/matomo" -prune -o -exec chown "${FIlE_OWNER_USERID:-1000}:${GID:-1000}" {} +
find "/var/www/html/$WORDPRESS_FOLDER" -path "/var/www/html/$WORDPRESS_FOLDER/wp-content/plugins/matomo" -prune -o -exec chmod 0777 {} +
chmod -R 0777 "/var/www/html/$WORDPRESS_FOLDER/wp-content/plugins/matomo/app/tmp" "/var/www/html/index.php" "/usr/local/etc/php/conf.d" "/var/www/html/$WORDPRESS_FOLDER/debug.log" /var/www/html/matomo.wpload_dir.php

echo "finish wordpress install (multisite = $MULTISITE)"
}

function start_webserver() {
Expand All @@ -536,12 +534,18 @@ function start_webserver() {
fi
}

echo "local-dev-entrypoint" "$@"

export_global

if [[ "$EXECUTE_CLI" = "1" ]]; then
handle_cli_command "$@"
fi

echo "waiting for database..."
sleep 5 # wait for database
echo "done."

# install normal wordpress + multisite wordpress
install_wordpress 0
install_wordpress 1
Expand Down

0 comments on commit 0f72e64

Please sign in to comment.