mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
- 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>
13 lines
341 B
Python
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)
|