Fix check_service_active leaking error output

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12 2018-07-28 20:50:04 -04:00
parent 1844bf17a7
commit 3d87398721
No known key found for this signature in database
GPG key ID: ABB8FC9789AF524D

View file

@ -1370,11 +1370,11 @@ check_service_active() {
# If systemctl exists,
if command -v systemctl &> /dev/null; then
# use that to check the status of the service
systemctl is-enabled "${1}" > /dev/null
systemctl is-enabled "${1}" &> /dev/null
# Otherwise,
else
# fall back to service command
service "${1}" status > /dev/null
service "${1}" status &> /dev/null
fi
}