mirror of
https://github.com/rommapp/romm.git
synced 2026-06-27 22:35:57 +00:00
fix(sync): export SYNC_BASE_PATH so the Python child inherits it
The shell fallback was assigned locally but never exported, so sync_watcher.py and the Python config layer never saw the resolved value. They happened to land on the same /var/lib/romm/sync default by coincidence; export it so the shell and Python defaults stay linked through a single source of truth. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -248,18 +248,18 @@ start_bin_watcher() {
|
||||
|
||||
start_bin_sync_watcher() {
|
||||
info_log "Starting sync folder watcher"
|
||||
local sync_base_path="${SYNC_BASE_PATH:-/var/lib/romm/sync}"
|
||||
mkdir -p "${sync_base_path}"
|
||||
export SYNC_BASE_PATH="${SYNC_BASE_PATH:-/var/lib/romm/sync}"
|
||||
mkdir -p "${SYNC_BASE_PATH}"
|
||||
if [[ ${OTEL_SDK_DISABLED:-false} == "true" ]]; then
|
||||
watchfiles \
|
||||
--target-type command \
|
||||
"python3 sync_watcher.py" \
|
||||
"${sync_base_path}" &
|
||||
"${SYNC_BASE_PATH}" &
|
||||
else
|
||||
watchfiles \
|
||||
--target-type command \
|
||||
"opentelemetry-instrument --service_name '${OTEL_SERVICE_NAME_PREFIX-}sync_watcher' python3 sync_watcher.py" \
|
||||
"${sync_base_path}" &
|
||||
"${SYNC_BASE_PATH}" &
|
||||
fi
|
||||
SYNC_WATCHER_PID=$!
|
||||
echo "${SYNC_WATCHER_PID}" >/tmp/sync_watcher.pid
|
||||
|
||||
@@ -80,7 +80,7 @@ watchfiles \
|
||||
|
||||
if [[ ${ENABLE_SYNC_FOLDER_WATCHER:-false} == "true" ]]; then
|
||||
echo "Starting sync folder watcher..."
|
||||
SYNC_BASE_PATH="${SYNC_BASE_PATH:-/var/lib/romm/sync}"
|
||||
export SYNC_BASE_PATH="${SYNC_BASE_PATH:-/var/lib/romm/sync}"
|
||||
mkdir -p "${SYNC_BASE_PATH}"
|
||||
watchfiles \
|
||||
--target-type command \
|
||||
|
||||
Reference in New Issue
Block a user