Fix error determin service file at some check scripts.
This commit is contained in:
parent
d84aafcbe8
commit
c0959fa621
@ -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))"
|
||||||
|
@ -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))"
|
||||||
|
@ -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))"
|
||||||
|
Loading…
Reference in New Issue
Block a user