Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthecalcaholic <6317548+theCalcaholic@users.noreply.github.com>2022-07-28 20:48:52 +0300
committerthecalcaholic <6317548+theCalcaholic@users.noreply.github.com>2022-07-28 20:48:52 +0300
commitca7fc4d7cfdb06d8c97db86e602a641acc89d811 (patch)
treee996e02d388ec988a8f2d0a3479cd5a7260e2f2c
parentbaae501f3c680d2ac99f27777d20ea320691f428 (diff)
metrics.sh: Prevent unbound variable when reloading metrics configfix/ncdatadir-unbound-variable
-rw-r--r--bin/ncp/SYSTEM/metrics.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/ncp/SYSTEM/metrics.sh b/bin/ncp/SYSTEM/metrics.sh
index 7efb2b4a..3f9ca20e 100644
--- a/bin/ncp/SYSTEM/metrics.sh
+++ b/bin/ncp/SYSTEM/metrics.sh
@@ -27,6 +27,7 @@ tmpl_metrics_enabled() {
}
reload_metrics_config() {
+ set +u
is_supported || return 0
install_template ncp-metrics.cfg.sh "/usr/local/etc/ncp-metrics.cfg" || {
@@ -48,7 +49,7 @@ metrics_services() {
if [[ "$cmd" =~ (start|stop|restart|reload|status) ]]
then
- if ! is_docker && ! [[ -d /run/systemd/system ]]
+ if ! is_docker && ! [[ -d /run/systemd/system ]]
then
echo "Probably running in chroot. Ignoring 'metrics_services $cmd'..."
return 0