Allow setup through noninteractive SSH

This commit is contained in:
Nick Sweeting 2026-08-01 03:35:40 -07:00
parent d8535aa8d4
commit 7aaf4dabaf
No known key found for this signature in database
2 changed files with 9 additions and 1 deletions

View File

@ -47,6 +47,12 @@ def test_setup_script_prints_root_safe_runtime_commands():
assert "--connect-timeout 1 --max-time 2" in script
def test_setup_script_does_not_clear_without_a_terminal():
script = SETUP_SCRIPT.read_text()
assert "if [ -t 1 ]; then\n clear\nfi" in script
def test_setup_script_moves_legacy_collection_without_moving_compose(tmp_path):
script = SETUP_SCRIPT.read_text()
function_prefix = script.partition("\ndocker_pull_archivebox() {")[0]

View File

@ -17,7 +17,9 @@ fi
if (set -o errtrace) 2>/dev/null; then
set -o errtrace
fi
clear
if [ -t 1 ]; then
clear
fi
RUNNING_AS_ROOT="false"
ARCHIVEBOX_SYSTEM_USER="archivebox"