Skip to content

Commit

Permalink
Make version number into a number
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Jul 24, 2016
1 parent e2958f8 commit 4cc24ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion virtualmin-mailman-lib.pl
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@

our $lists_file = "$module_config_directory/list-domains";

# get_mailman_version()
# Returns the mailman version number (as a float)
sub get_mailman_version
{
my $out = `$mailman_dir/bin/version 2>/dev/null </dev/null`;
if ($out =~ /version\s+(\S+)/i || $out =~ /version:\s+(\S+)/i) {
if ($out =~ /version\s+(\d+(\.\d+)?)/i || $out =~ /version:\s+(\d+(\.\d+)?)/i) {
return $1;
}
return undef;
Expand Down

0 comments on commit 4cc24ca

Please sign in to comment.