mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
*: Use action_utils.run instead of subprocess.run
- This is to capture stdout and stderr and transmit that from privileged daemon back to the service to be displayed in HTML. Tests: - Unit tests and code checks pass. - Some of the modified actions work as expected. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
1 parent
355812c9f2
commit
61ff15a04f
36 files changed
+257
-244
No files matched your search
@@ -1,7 +1,6 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""Configure minidlna server."""
|
||||
|
||||
import subprocess
|
||||
from os import chmod, fdopen, remove, stat
|
||||
from shutil import move
|
||||
from tempfile import mkstemp
|
||||
@@ -51,7 +50,7 @@ def setup():
|
||||
encoding='utf-8') as conf:
|
||||
conf.write(SYSCTL_CONF)
|
||||
|
||||
subprocess.run(['systemctl', 'restart', 'systemd-sysctl'], check=True)
|
||||
action_utils.run(['systemctl', 'restart', 'systemd-sysctl'], check=True)
|
||||
|
||||
|
||||
@privileged
|
||||
|
||||
Reference in new issue
Block a user