Skip to content

Commit aeef397

Browse files
committed
Run it for real
1 parent 5b48e34 commit aeef397

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ RUN crontab /etc/cron.d/import-cron
2525
RUN touch /var/log/cron.log
2626

2727
# Start the cron service and the application
28-
CMD printenv > /etc/environment && cron && tail -f /var/log/cron.log
28+
CMD printenv > /etc/environment && cron && tail -f /var/log/cron.log

import.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
#!/bin/sh
22

3+
# This file is run on successful log rotation
4+
35
# Define the log file and the rotated log file
46
ROTATED_LOG_FILE="$LOG_PATH.1"
57

68
# Check if the rotated log file exists
79
if [ -f "$ROTATED_LOG_FILE" ]; then
810
echo "Log rotation successful. Processing the rotated log file."
911
# Call the import script
10-
python3 /app/import_logs.py --dry-run "$ROTATED_LOG_FILE" --url "$MATOMO_URL" --token-auth "$API_TOKEN"
12+
python3 /app/import_logs.py "$ROTATED_LOG_FILE" --url "$MATOMO_URL" --token-auth "$API_TOKEN"
1113

1214
# Find the PID of the traefik process
1315
TRAEFIK_PID=$(pgrep traefik)

0 commit comments

Comments
 (0)