Skip to content

Commit

Permalink
Create initial site file to satisfy config check
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Jul 20, 2020
1 parent b90b390 commit bc37565
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/Virtualmin/Config/Plugin/ProFTPd.pm
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,18 @@ EOF

# Generate a basic config, subbing in the right variables.
flush_file_lines();

# Create initial site file to satisfy config check
my $site_conf = "$ENV{'WEBMIN_CONFIG'}/proftpd/site";
if (! -r $site_conf) {
my $ver;
my %site_conf;
$ver = proftpd::get_proftpd_version();
$site_conf{'version'} = $ver;
write_file($site_conf, \%site_conf);
}

# Restart ProFTPd
init::restart_action("proftpd");

$self->done(1); # OK!
Expand Down

0 comments on commit bc37565

Please sign in to comment.