diff --git a/bin/ncp/SYSTEM/metrics.sh b/bin/ncp/SYSTEM/metrics.sh index 83c45150..5fd6b3c0 100644 --- a/bin/ncp/SYSTEM/metrics.sh +++ b/bin/ncp/SYSTEM/metrics.sh @@ -48,7 +48,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 @@ -186,7 +186,7 @@ service ncp-metrics-exporter start EOF chmod +x /etc/services-available.d/101ncp-metrics - else + else #=> if not is_docker cat < /etc/systemd/system/ncp-metrics-exporter.service [Unit] diff --git a/updates/1.47.0.sh b/updates/1.47.0.sh index fe1f79ae..671ebdca 100644 --- a/updates/1.47.0.sh +++ b/updates/1.47.0.sh @@ -8,7 +8,7 @@ source /usr/local/etc/library.sh for svc in prometheus-node-exporter ncp-metrics-exporter do service "$svc" status || [[ $? -ne 4 ]] || continue - service "$svc" stop + service "$svc" stop || [[ $? -ne 4 ]] done # Reinstall metrics services