Server IP : 195.201.23.43 / Your IP : 3.12.107.192 Web Server : Apache System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 User : kdecoratie ( 1041) PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/webmin/virtual-server/ |
Upload File : |
# Defines the function for validating the Virtualmin licence, by making an # HTTP request to the licence CGI. $virtualmin_licence_host = "software.virtualmin.com"; $virtualmin_licence_port = 443; $virtualmin_licence_prog = "/cgi-bin/vlicence.cgi"; $virtualmin_licence_ssl = 1; $virtualmin_renewal_url = $config{'renewal_url'} || "https://virtualmin.com/shop/"; # licence_scheduled(hostid, [serial, key], [vps-type]) # Returns a status code (0=OK, 1=Invalid, 2=Down, 3=Expired), the expiry date, # an error message, the number of domains max, the number of servers max, # the number of servers used, and the auto-renewal flag sub licence_scheduled { local ($hostid, $serial, $key, $vps) = @_; local ($out, $error); local @doms = grep { !$_->{'alias'} } &list_domains(); &read_env_file($virtualmin_license_file, \%serial); $key ||= $serial{'LicenseKey'}; &http_download($virtualmin_licence_host, $virtualmin_licence_port, "$virtualmin_licence_prog?id=$hostid&". "serial=$key&doms=".scalar(@doms)."&vps=$vps", \$out, \$error, undef, $virtualmin_licence_ssl, undef, undef, 0, 0, 1); return (2, undef, "Failed to contact licence server : $error") if ($error); return $out =~ /^EXP\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)/ ? (3, $1, "The licence for this server expired on $1", $2, $3, $4) : $out =~ /^ERR\s+(.*)/ ? (2, undef, "An error occurred checking the licence : $1", undef) : $out =~ /^OK\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\d+)/ ? (0, $1, undef, $2, $3, $4, $5) : # Auto-renewal flag $out =~ /^OK\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)/ ? (0, $1, undef, $2, $3, $4) : (1, undef, "No valid licence was found for your host ID $_[0] and serial number $serial{'LicenseKey'}", undef); } 1;Private