diff --git a/authentic-lib.pl b/authentic-lib.pl index c0c5db91b..7a00ce35d 100644 --- a/authentic-lib.pl +++ b/authentic-lib.pl @@ -696,31 +696,35 @@ sub get_sysinfo_vars # Virtualmin version if ($has_virtualmin) { &foreign_require("virtual-server"); - my ($major, $minor, $build) = &virtual_server::get_module_version_and_type(1); - my ($vs_license, $__virtual_server_version); - $vs_license = check_pro_package('vm'); - $__virtual_server_version = ("$major.$minor".(defined($build) ? ".$build" : '').""); - $virtualmin_version = ( - product_version_update($__virtual_server_version, 'v') . " " . ( - $vs_license eq '0' ? '' : - '' - - . ' Pro
' : - '') - ) . - ($vs_license eq '1' ? '' : ' ') . - '' - . '' - ); + if (defined(&virtual_server::get_module_version_and_type)) { + my ($major, $minor, $build) = &virtual_server::get_module_version_and_type(1); + my ($vs_license, $__virtual_server_version); + $vs_license = check_pro_package('vm'); + $__virtual_server_version = ("$major.$minor".(defined($build) ? ".$build" : '').""); + $virtualmin_version = ( + product_version_update($__virtual_server_version, 'v') . " " . ( + $vs_license eq '0' ? '' : + '' + + . ' Pro ' : + '') + ) . + ($vs_license eq '1' ? '' : ' ') . + '' + . '' + ); + } else { + $virtualmin_version = $virtual_server::module_info{'version'}; + } } # Cloudmin version