diff options
author | thecalcaholic <6317548+theCalcaholic@users.noreply.github.com> | 2022-07-28 10:37:35 +0300 |
---|---|---|
committer | thecalcaholic <6317548+theCalcaholic@users.noreply.github.com> | 2022-07-28 10:37:47 +0300 |
commit | c3f4e766be494aa2cf07ce1c80b6b9e970ded95c (patch) | |
tree | 737beeb8e40afebc43b91df8eebcb1f050d78ce1 | |
parent | fcd2f47270385f8337e9e726a17ed4d711d22ce5 (diff) |
1.47.0.sh: Fix ncp-update if prometheus-node-exporter was not installed before
-rw-r--r-- | bin/ncp/SYSTEM/metrics.sh | 4 | ||||
-rw-r--r-- | updates/1.47.0.sh | 2 |
2 files changed, 3 insertions, 3 deletions
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 <<EOF > /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 |