From eae98b67185fcd845f47bdb5e5776c72b7e28992 Mon Sep 17 00:00:00 2001 From: Jari Matilainen Date: Sat, 7 Jan 2017 11:40:40 +0000 Subject: Added unlink to remove the uncompressed log --- scripts/logcompress_perl.pl | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/logcompress_perl.pl b/scripts/logcompress_perl.pl index 062331e..37395b5 100644 --- a/scripts/logcompress_perl.pl +++ b/scripts/logcompress_perl.pl @@ -18,6 +18,7 @@ $VERSION = "0.01"; sub sig_rotate { my $input = $_[0]->{real_fname}; gzip $input => "$input.gz" or Irssi::print(MSGLEVEL_CLIENTERROR, "gzip failed: $GzipError\n"); + unlink $input if -e "$input.gz"; } Irssi::signal_add('log rotated', 'sig_rotate'); -- cgit v1.2.3 From 1227498150f85df70ce134759b5e83ef3852d4b4 Mon Sep 17 00:00:00 2001 From: Jari Matilainen Date: Sat, 7 Jan 2017 11:52:46 +0000 Subject: Forgot to change version --- scripts/logcompress_perl.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/logcompress_perl.pl b/scripts/logcompress_perl.pl index 37395b5..d75755a 100644 --- a/scripts/logcompress_perl.pl +++ b/scripts/logcompress_perl.pl @@ -4,7 +4,7 @@ use Irssi; use IO::Compress::Gzip qw(gzip $GzipError); use vars qw($VERSION %IRSSI); -$VERSION = "0.01"; +$VERSION = "0.02"; %IRSSI = ( authors => 'vague', contact => 'vague!#irssi@fgreenode', @@ -12,7 +12,7 @@ $VERSION = "0.01"; description => "compress logfiles then they're rotated, modified from original logcompress.pl to use perl modules instead", license => "Public Domain", url => "http://irssi.org/", - changed => "2016-01-31T01:45+0100" + changed => "2017-01-07T12:00+0100" ); sub sig_rotate { -- cgit v1.2.3