From 66b5d958b16bf41255c3b145ff5dd6625a0f95df Mon Sep 17 00:00:00 2001 From: Ruslan Baidan Date: Tue, 17 Nov 2020 14:39:50 +0100 Subject: [PATCH] Updated the frontoffice dependency and added the script to collects stats for all the clients on prod. --- composer.lock | 8 ++++---- scripts/collect-stats-for-all-clients.sh | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 scripts/collect-stats-for-all-clients.sh diff --git a/composer.lock b/composer.lock index d2d9a2d..cbedeb5 100644 --- a/composer.lock +++ b/composer.lock @@ -4501,12 +4501,12 @@ "source": { "type": "git", "url": "https://github.com/monarc-project/zm-client.git", - "reference": "274200ba305ce451838af78b8ed8354bc8e87c04" + "reference": "9dda6a8fe84e462eca08d4538b61a532d78e2053" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/monarc-project/zm-client/zipball/274200ba305ce451838af78b8ed8354bc8e87c04", - "reference": "274200ba305ce451838af78b8ed8354bc8e87c04", + "url": "https://api.github.com/repos/monarc-project/zm-client/zipball/9dda6a8fe84e462eca08d4538b61a532d78e2053", + "reference": "9dda6a8fe84e462eca08d4538b61a532d78e2053", "shasum": "" }, "require": { @@ -4585,7 +4585,7 @@ "issues": "https://github.com/monarc-project/zm-client/issues", "source": "https://github.com/monarc-project/zm-client/tree/feature/stats" }, - "time": "2020-11-17T10:19:09+00:00" + "time": "2020-11-17T13:35:28+00:00" }, { "name": "monarc/phpword", diff --git a/scripts/collect-stats-for-all-clients.sh b/scripts/collect-stats-for-all-clients.sh new file mode 100644 index 0000000..492dbf4 --- /dev/null +++ b/scripts/collect-stats-for-all-clients.sh @@ -0,0 +1,19 @@ +#! /usr/bin/env bash + +# local use: +#for conf_file_path in /home/vagrant/monarc/config/*/local.php + +for conf_file_path in /var/www/*/local.php +do + config_path=$(dirname "$conf_file_path") + export APP_CONF_DIR=$config_path + + echo "[$(date)] Collecting stats for client: $config_path." + + # local use: + #/home/vagrant/monarc/bin/console monarc:collect-stats >> "$config_path"/collect_stats.log + + /var/lib/monarc/fo/bin/console monarc:collect-stats >> "$config_path"/collect_stats.log + + echo "[$(date)] Finished." +done