mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +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.
|
root is required, so that Plinth can run as non-root.
|
||||||
- xmpp: Switched to using ruamel.yaml to modify ejabberd config.
|
- xmpp: Switched to using ruamel.yaml to modify ejabberd config.
|
||||||
- Exit with error if any of the setup steps fail.
|
- Exit with error if any of the setup steps fail.
|
||||||
|
- actions: Hush some unneeded output of systemd.
|
||||||
|
|
||||||
## [0.10.0] - 2016-08-12
|
## [0.10.0] - 2016-08-12
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@ -59,7 +59,8 @@ def service_is_running(servicename):
|
|||||||
def service_is_enabled(service_name):
|
def service_is_enabled(service_name):
|
||||||
"""Check if service is enabled in systemd."""
|
"""Check if service is enabled in systemd."""
|
||||||
try:
|
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
|
return True
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
return False
|
return False
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user