Fix error determin service file at some check scripts.

This commit is contained in:
Christoph 2019-07-24 15:50:00 +02:00
parent d84aafcbe8
commit c0959fa621
3 changed files with 3 additions and 3 deletions

View File

@ -155,7 +155,7 @@ if [[ -n "$SYSTEMD_SERVICE" ]] ; then
if [[ -f "/etc/systemd/system/$SYSTEMD_SERVICE" ]] ; then if [[ -f "/etc/systemd/system/$SYSTEMD_SERVICE" ]] ; then
_systemd_service_file="/etc/systemd/system/$SYSTEMD_SERVICE" _systemd_service_file="/etc/systemd/system/$SYSTEMD_SERVICE"
elif [[ -f "/lib/systemd/system/$SYSTEMD_SERVICE" ]] ; then 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 fi
if [[ -n "$_systemd_service_file" ]]; then 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))" check_string_ps="$(trim $(cat "$_systemd_service_file" | grep ExecStart | grep -o -E "ExecStart\s*=\s*[^[:space:]]+" | cut -d "=" -f2))"

View File

@ -139,7 +139,7 @@ if [[ -n "$SYSTEMD_SERVICE" ]] ; then
if [[ -f "/etc/systemd/system/$SYSTEMD_SERVICE" ]] ; then if [[ -f "/etc/systemd/system/$SYSTEMD_SERVICE" ]] ; then
_systemd_service_file="/etc/systemd/system/$SYSTEMD_SERVICE" _systemd_service_file="/etc/systemd/system/$SYSTEMD_SERVICE"
elif [[ -f "/lib/systemd/system/$SYSTEMD_SERVICE" ]] ; then 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 fi
if [[ -n "$_systemd_service_file" ]]; then 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))" check_string_ps="$(trim $(cat "$_systemd_service_file" | grep ExecStart | grep -o -E "ExecStart\s*=\s*[^[:space:]]+" | cut -d "=" -f2))"

View File

@ -147,7 +147,7 @@ if [[ -n "$SYSTEMD_SERVICE" ]] ; then
if [[ -f "/etc/systemd/system/$SYSTEMD_SERVICE" ]] ; then if [[ -f "/etc/systemd/system/$SYSTEMD_SERVICE" ]] ; then
_systemd_service_file="/etc/systemd/system/$SYSTEMD_SERVICE" _systemd_service_file="/etc/systemd/system/$SYSTEMD_SERVICE"
elif [[ -f "/lib/systemd/system/$SYSTEMD_SERVICE" ]] ; then 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 fi
if [[ -n "$_systemd_service_file" ]]; then 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))" check_string_ps="$(trim $(cat "$_systemd_service_file" | grep ExecStart | grep -o -E "ExecStart\s*=\s*[^[:space:]]+" | cut -d "=" -f2))"