The regex wasn't anchored, so wasn't being very helpful.
-nagios-plugins-local (0.15~test.1) UNRELEASED; urgency=medium
+nagios-plugins-local (0.15) unstable; urgency=medium
* check_md_raid:
- strip trailing spaces from mdadm state
* nagios-plugins-local-client:
- new plugin: check_monit
+ * check_configtool:
+ - fix regex looking for configtool cronjobs
- -- Michael Howe <michael.howe@it.ox.ac.uk> Wed, 06 Sep 2017 19:00:00 +0100
+ -- Michael Howe <michael@michaelhowe.org> Sat, 09 Dec 2017 12:23:39 +0000
nagios-plugins-local (0.14) unstable; urgency=low
my $cronjob_exists = 0;
CRONTABS: foreach my $file ( glob '/etc/cron.d/*' ){
# letters, digits, underscores and hyphens, per cron(8)
- next unless $file =~ m{[a-z0-9_-]+}i;
+ next unless $file =~ m{^[a-z0-9_-]+$}i;
open( my $fh, "<", $file )
or die "Could not open $file for reading: $!";
while( my $line = <$fh> ){