Fix tor log file getting removed (#157)

This commit is contained in:
CaliBrain
2025-04-22 11:15:15 -07:00
committed by GitHub
parent 88a95fe15e
commit 93e15cbdd0
3 changed files with 11 additions and 3 deletions

View File

@@ -131,4 +131,4 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Override the default command to run Tor
CMD ["/app/tor.sh"]
CMD ["/app/entrypoint.sh"]

View File

@@ -6,6 +6,13 @@ LOG_FILE=${LOG_DIR}/cwa-bd_entrypoint.log
# Cleanup any existing files or folders in the log directory
rm -rf $LOG_DIR/*
(
if [ "$USING_TOR" = "true" ]; then
./tor.sh
fi
)
exec 3>&1 4>&2
exec > >(tee -a $LOG_FILE) 2>&1
echo "Starting entrypoint script"

5
tor.sh
View File

@@ -11,6 +11,8 @@ echo "Log file: $LOG_FILE"
set +x
set -e
echo "[*] Running tor script..."
echo "Build version: $BUILD_VERSION"
echo "[*] Installing Tor and dependencies..."
@@ -116,5 +118,4 @@ else
fi
# Run the entrypoint script
echo "[*] Running entrypoint script..."
./entrypoint.sh
echo "[*] End of tor script"