mirror of
https://github.com/calibrain/shelfmark.git
synced 2026-04-19 21:39:17 -04:00
Fix tor log file getting removed (#157)
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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
5
tor.sh
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user