Fix `check_service_active` leaking error output

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
pull/2314/head
Mcat12 6 years ago
parent 1844bf17a7
commit 3d87398721
No known key found for this signature in database
GPG Key ID: ABB8FC9789AF524D

@ -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
}

Loading…
Cancel
Save