mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
actions: Hush some unneeded output of systemd
This commit is contained in:
parent
72c6aad514
commit
65aadef546
@ -27,6 +27,7 @@ All notable changes to this project will be documented in this file.
|
||||
root is required, so that Plinth can run as non-root.
|
||||
- xmpp: Switched to using ruamel.yaml to modify ejabberd config.
|
||||
- Exit with error if any of the setup steps fail.
|
||||
- actions: Hush some unneeded output of systemd.
|
||||
|
||||
## [0.10.0] - 2016-08-12
|
||||
### Added
|
||||
|
||||
@ -59,7 +59,8 @@ def service_is_running(servicename):
|
||||
def service_is_enabled(service_name):
|
||||
"""Check if service is enabled in systemd."""
|
||||
try:
|
||||
subprocess.check_output(['systemctl', 'is-enabled', service_name])
|
||||
subprocess.run(['systemctl', 'is-enabled', service_name], check=True,
|
||||
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
return True
|
||||
except subprocess.CalledProcessError:
|
||||
return False
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user