Sunil Mohan Adapa 7f608cd570
*: Collect output for all privileged sub-processes
- Now that we have a mechanism for properly collecting, transmitting, and display
the stdout and stderr. There is no reason not to collect all of the stdin and
stderr.

- Also, the stdin/stderr=subprocess.PIPE is redundant and prevents the output
from getting collected for debugging. So, remove it.

Tests:

- Ran functional tests on backups, calibre, ejabberd, email, gitweb, ikiwiki,
infinoted, kiwix, mediawiki, mumble, nextcloud,, openvpn, samba, wireguard,
zoph. 2-3 issues were found but did not seem like new errors.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-09-29 16:58:57 +03:00

13 lines
341 B
Python

# SPDX-License-Identifier: AGPL-3.0-or-later
"""Set time zone with timedatectl."""
from plinth import action_utils
from plinth.actions import privileged
@privileged
def set_timezone(timezone: str):
"""Set time zone with timedatectl."""
command = ['timedatectl', 'set-timezone', timezone]
action_utils.run(command, check=True)