Skip to content

Commit

Permalink
Lets keep it a bit cleaner.
Browse files Browse the repository at this point in the history
  • Loading branch information
mihxil committed Jan 19, 2025
1 parent 89c73fa commit 7933637
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ COPY binbash /.binbash
# - Setting up timezone and stuff
RUN echo "dash dash/sh boolean false" | debconf-set-selections && DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
dpkg-reconfigure --frontend noninteractive tzdata
dpkg-reconfigure --frontend noninteractive tzdata && \
mkdir -p /scripts


# With bearable key bindings:
Expand All @@ -103,7 +104,7 @@ COPY exrc /.exrc
COPY bash.bashrc /etc/bash.bashrc

# A script that can parse our access logs
COPY parse_tomcat_access_logs.pl /
COPY parse_tomcat_access_logs.pl /scripts


# some files which might be needed during build
Expand Down
2 changes: 0 additions & 2 deletions catalina_base/bin/setenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,3 @@ if [ -z ${TOMCAT_ACCEPT_COUNT+x} ]; then
export TOMCAT_ACCEPT_COUNT=100
fi

# 'parse
find / -type f -executable -name "parse*" -print -exec cp "{}" /tmp \;
5 changes: 4 additions & 1 deletion parse_tomcat_access_logs.pl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ =head1 parse_tomcat_access_logs()
- max age in minutes (defaults to 1440, one day)
=cut

use strict;
Expand All @@ -22,6 +21,10 @@ =head1 parse_tomcat_access_logs()
if (scalar(@ARGV) ge 1) {
$age = $ARGV[0];
}
my $now="\${dateset_date}";
if (scalar(@ARGV) ge 2) {
$now= $ARGV[1];
}

my $after =`date --iso-8601=minutes --date="\${dataset_date} -$age minute"`;
my $findcommand="find $dir -cmin -$age -name 'tomcat_access.log*'";
Expand Down

0 comments on commit 7933637

Please sign in to comment.