From c0959fa62128054304be7492fbacc4760e2f3808 Mon Sep 17 00:00:00 2001 From: Christoph Date: Wed, 24 Jul 2019 15:50:00 +0200 Subject: [PATCH] Fix error determin service file at some check scripts. --- check_dovecot.sh | 2 +- check_postfwd.sh | 2 +- check_service.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/check_dovecot.sh b/check_dovecot.sh index d006bfd..f251eb7 100755 --- a/check_dovecot.sh +++ b/check_dovecot.sh @@ -155,7 +155,7 @@ if [[ -n "$SYSTEMD_SERVICE" ]] ; then if [[ -f "/etc/systemd/system/$SYSTEMD_SERVICE" ]] ; then _systemd_service_file="/etc/systemd/system/$SYSTEMD_SERVICE" elif [[ -f "/lib/systemd/system/$SYSTEMD_SERVICE" ]] ; then - _systemd_service_file="/etc/systemd/system/$SYSTEMD_SERVICE" + _systemd_service_file="/lib/systemd/system/$SYSTEMD_SERVICE" fi if [[ -n "$_systemd_service_file" ]]; then check_string_ps="$(trim $(cat "$_systemd_service_file" | grep ExecStart | grep -o -E "ExecStart\s*=\s*[^[:space:]]+" | cut -d "=" -f2))" diff --git a/check_postfwd.sh b/check_postfwd.sh index 152c876..4b290f0 100755 --- a/check_postfwd.sh +++ b/check_postfwd.sh @@ -139,7 +139,7 @@ if [[ -n "$SYSTEMD_SERVICE" ]] ; then if [[ -f "/etc/systemd/system/$SYSTEMD_SERVICE" ]] ; then _systemd_service_file="/etc/systemd/system/$SYSTEMD_SERVICE" elif [[ -f "/lib/systemd/system/$SYSTEMD_SERVICE" ]] ; then - _systemd_service_file="/etc/systemd/system/$SYSTEMD_SERVICE" + _systemd_service_file="/lib/systemd/system/$SYSTEMD_SERVICE" fi if [[ -n "$_systemd_service_file" ]]; then check_string_ps="$(trim $(cat "$_systemd_service_file" | grep ExecStart | grep -o -E "ExecStart\s*=\s*[^[:space:]]+" | cut -d "=" -f2))" diff --git a/check_service.sh b/check_service.sh index 1830e3c..3825746 100755 --- a/check_service.sh +++ b/check_service.sh @@ -147,7 +147,7 @@ if [[ -n "$SYSTEMD_SERVICE" ]] ; then if [[ -f "/etc/systemd/system/$SYSTEMD_SERVICE" ]] ; then _systemd_service_file="/etc/systemd/system/$SYSTEMD_SERVICE" elif [[ -f "/lib/systemd/system/$SYSTEMD_SERVICE" ]] ; then - _systemd_service_file="/etc/systemd/system/$SYSTEMD_SERVICE" + _systemd_service_file="/lib/systemd/system/$SYSTEMD_SERVICE" fi if [[ -n "$_systemd_service_file" ]]; then check_string_ps="$(trim $(cat "$_systemd_service_file" | grep ExecStart | grep -o -E "ExecStart\s*=\s*[^[:space:]]+" | cut -d "=" -f2))"