mirror of
https://github.com/pi-hole/pi-hole
synced 2024-11-17 21:59:55 +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 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…
Reference in New Issue
Block a user