mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
Fix check_service_active
leaking error output
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
parent
1844bf17a7
commit
3d87398721
@ -1370,11 +1370,11 @@ check_service_active() {
|
|||||||
# If systemctl exists,
|
# If systemctl exists,
|
||||||
if command -v systemctl &> /dev/null; then
|
if command -v systemctl &> /dev/null; then
|
||||||
# use that to check the status of the service
|
# use that to check the status of the service
|
||||||
systemctl is-enabled "${1}" > /dev/null
|
systemctl is-enabled "${1}" &> /dev/null
|
||||||
# Otherwise,
|
# Otherwise,
|
||||||
else
|
else
|
||||||
# fall back to service command
|
# fall back to service command
|
||||||
service "${1}" status > /dev/null
|
service "${1}" status &> /dev/null
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user