diff options
author | maneamarius <locomotion.itservices@gmail.com> | 2022-01-10 18:42:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-10 18:42:26 +0200 |
commit | 45d5faa453bb47a22e49358e95a183efe3eee235 (patch) | |
tree | 21fa1fafc0b1f58c29e87b976fd00ca325468650 | |
parent | a46e36aef9397ded995090928042ad16229e5e9b (diff) |
fix retrieving service commands without failure (#11947)
Co-authored-by: Marius Manea <marius@netdata.com>
-rw-r--r-- | packaging/installer/functions.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packaging/installer/functions.sh b/packaging/installer/functions.sh index 6264c1131d..bd9ca39b56 100644 --- a/packaging/installer/functions.sh +++ b/packaging/installer/functions.sh @@ -184,9 +184,9 @@ netdata_banner() { # ----------------------------------------------------------------------------- # portable service command -service_cmd="$(command -v service 2> /dev/null)" -rcservice_cmd="$(command -v rc-service 2> /dev/null)" -systemctl_cmd="$(command -v systemctl 2> /dev/null)" +service_cmd="$(command -v service 2> /dev/null || true)" +rcservice_cmd="$(command -v rc-service 2> /dev/null || true)" +systemctl_cmd="$(command -v systemctl 2> /dev/null || true)" service() { local cmd="${1}" action="${2}" |