diff --git a/rootfs/etc/cont-init.d/55-firefox.sh b/rootfs/etc/cont-init.d/55-firefox.sh index 1f89ef1..1fe8c77 100755 --- a/rootfs/etc/cont-init.d/55-firefox.sh +++ b/rootfs/etc/cont-init.d/55-firefox.sh @@ -62,10 +62,15 @@ if [ -n "$(ls /config/profile/sessionstore-backups/*.jsonlz4 2>/dev/null)" ]; th done fi -# Make sure monitored log files exist. -for LOG_FILE in /config/log/firefox/error.log +# Initialize log files. +for LOG_FILE in /config/log/firefox/output.log /config/log/firefox/error.log do touch "$LOG_FILE" + + # Make sure the file doesn't grow indefinitely. + if [ "$(stat -c %s "$LOG_FILE")" -gt 1048576 ]; then + echo > "$LOG_FILE" + fi done # vim: set ft=sh :