mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
backup: Make restore-backup work in docker.
Co-authored-by: Anders Kaseorg <anders@zulip.com> Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
@@ -116,6 +116,12 @@ def get_zulip_pwent() -> pwd.struct_passwd:
|
||||
# `zulip` user as that's the correct value in production.
|
||||
return pwd.getpwnam("zulip")
|
||||
|
||||
def get_postgres_pwent() -> pwd.struct_passwd:
|
||||
try:
|
||||
return pwd.getpwnam("postgres")
|
||||
except KeyError:
|
||||
return get_zulip_pwent()
|
||||
|
||||
def su_to_zulip(save_suid: bool = False) -> None:
|
||||
"""Warning: su_to_zulip assumes that the zulip checkout is owned by
|
||||
the zulip user (or whatever normal user is running the Zulip
|
||||
|
||||
Reference in New Issue
Block a user