Skip to content

Commit

Permalink
Replace site_url when domain is configured
Browse files Browse the repository at this point in the history
  • Loading branch information
escopecz committed Jul 9, 2024
1 parent bd0ccad commit 8d688d9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions setup-dc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,13 @@ else
echo "## Cron job for Let's Encrypt certificate renewal is already set"
fi

echo "## Check if Mautic is installed"
if docker compose exec -T mautic_web test -f /var/www/html/config/local.php && docker compose exec -T mautic_web grep -q "site_url" /var/www/html/config/local.php; then
echo "## Mautic is installed already."

# Replace the site_url value with the domain
echo "## Updating site_url in Mautic configuration..."
docker compose exec -T mautic_web sed -i "s|'site_url' => '.*',|'site_url' => 'https://$DOMAIN',|g" /var/www/html/config/local.php
fi

echo "## Script execution completed"

0 comments on commit 8d688d9

Please sign in to comment.