From 3d7ab485db0081412e970464d2dcd4eece367531 Mon Sep 17 00:00:00 2001 From: Valentin Date: Wed, 29 May 2024 17:24:41 +0200 Subject: [PATCH] if matomo installed take it into consideration in the webhook --- assets/webhook.sh | 4 ++++ bin/setup_matomo.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/webhook.sh b/assets/webhook.sh index 9ec6bb8..e14db23 100644 --- a/assets/webhook.sh +++ b/assets/webhook.sh @@ -13,6 +13,10 @@ fi jq '.scripts |= with_entries(.value |= gsub("\\bnuxt \\b"; "./node_modules/nuxt/bin/nuxt.mjs "))' package.json > temp.json && mv temp.json package.json +if [ -f "/var/www/repositories/${repo_name}/plugins/matomo-plugin.client.js" ]; then + npm install --save vue-matomo +fi + node --max-old-space-size=250 `which npm` install -y node --max-old-space-size=250 `which npm` run generate --prerender diff --git a/bin/setup_matomo.sh b/bin/setup_matomo.sh index ff6a260..1a86619 100644 --- a/bin/setup_matomo.sh +++ b/bin/setup_matomo.sh @@ -13,7 +13,7 @@ echo -e "${BLUE}https://${matomo_url}/index.php?module=SitesManager${RESET}" echo -e "${PURPLE}${BOLD}Enter the Website ID :${RESET}" read matomo_website_id -mkdir ${FRONT_DIRECTORY}/plugins +mkdir -p ${FRONT_DIRECTORY}/plugins cp assets/matomo-plugin.client.js ${FRONT_DIRECTORY}/plugins chown -R www-data:www-data ${FRONT_DIRECTORY}/plugins