Skip to content

Commit

Permalink
Need to require the virtualmin module https://www.virtualmin.com/node…
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Aug 31, 2017
1 parent 466e0e7 commit d99144b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion generate.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ require './virtualmin-awstats-lib.pl';
&ReadParse();
&error_setup($text{'generate_err'});
&can_domain($in{'dom'}) || &error($text{'edit_ecannot'});
&foreign_require("virtual-server");
my $d = &virtual_server::get_domain_by("dom", $in{'dom'});

&ui_print_unbuffered_header(undef, $text{'gen_title'}, "");
Expand All @@ -24,7 +25,7 @@ if ($in{'wipe'} && $data) {
print &text('gen_doing', "<tt>$in{'dom'}</tt>", "<tt>$log</tt>"),"<br>\n";
print "<pre>";
my $ok = &generate_report($in{'dom'}, *STDOUT, 1);
if ($ok && !$d->{'web'}) {
if ($ok && !&virtual_server::domain_has_website($d)) {
# Also re-generate static HTML
my $outdir = &virtual_server::public_html_dir($d)."/awstats";
&generate_html($in{'dom'}, $outdir);
Expand Down

0 comments on commit d99144b

Please sign in to comment.