Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

restore-backup: Ensure it is run as root.

Alex Vandiverc71c6187ea47
diff --git a/scripts/setup/restore-backup b/scripts/setup/restore-backup
index 62fe58fd31e..d70c1daefa1 100755
--- a/scripts/setup/restore-backup
+++ b/scripts/setup/restore-backup
@@ -9,7 +9,7 @@ from typing import IO
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(BASE_DIR)
-from scripts.lib.zulip_tools import get_postgres_pwent, run, su_to_zulip
+from scripts.lib.zulip_tools import assert_running_as_root, get_postgres_pwent, run, su_to_zulip
POSTGRES_PWENT = get_postgres_pwent()
@@ -18,7 +18,7 @@ parser.add_argument("tarball", help="Filename of input tarball")
def restore_backup(tarball_file: IO[bytes]) -> None:
-
+ assert_running_as_root()
su_to_zulip(save_suid=True)
from scripts.lib.setup_path import setup_path