nextcloudpi/updates/1.36.4.sh
Tobias Knöppler b8a990e264
Add ncp-app for prometheus (system) metrics
* metrics.{sh,cfg}: Implement ncp-app for prometheus (system) metrics

letsencrypts.sh, nc-nextcloud.sh, nextcloud.conf.sh: Introduce templating/generator concept to allow multiple ncp apps to edit the same file without conflicts

library.sh: Add convenience function find_app_param

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* letsencrypt.sh: Remove commented code

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* metrics.cfg: Deactivate by default

- Add title, description and remove TODO entries

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* metrics.sh: Restart apache after enabling proxy_http

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* update.sh: Update ncp-templates directory during updates

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* update.sh: Copy ncp-templates directory, not just its content

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* metrics.sh,update.sh: Disable metrics in docker for now

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* metrics.sh: Disable prometheus-node-exporter via systemctl

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* metrics.sh: Move apache mod configuration to updates

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* metrics.cfg: Remove invalid parameter type

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* metrics.sh: Create /etc/default/prometheus-node-exporter via heredoc

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* nextcloud.conf.sh: Prevent template parsing error if metrics.sh is disabled (i.e. on docker)

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* metrics.cfg: Add info directing users to my preconfigured ncp dashboard

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* Various fixes

- metrics.sh: Fix is_active function always returning 1
- metrics.sh: Fix apache2 reload potentially interrupting web ui
- nc-nextcloud.sh: exit if nextcloud.conf templating fails
- various readability and code style improvements

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* letsencrypt.sh: Use consistent return codes in tmpl_letsencrypt_domain

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* nextcloud.conf.sh: Remove obsolete return code escape

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* nextcloud.conf.sh: Ensure that the snakeoil self-signed cert exists before enabling it

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* updates/1.36.4.sh: Reload apache in the background instead of restarting it blockingly

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2021-08-02 15:12:56 -06:00

8 lines
150 B
Bash

#!/bin/bash
set -e
# Required for the reverse proxy of the metrics app
a2enmod proxy_http
bash -c "sleep 2 && service apache2 reload" &>/dev/null &