mirror of
https://github.com/webmin/webmin.git
synced 2026-06-09 22:40:23 +01:00
Fix to create extra config file on save
https://github.com/virtualmin/virtualmin-gpl/issues/324#issuecomment-4619300683
This commit is contained in:
16
dovecot/config_info.pl
Normal file
16
dovecot/config_info.pl
Normal file
@@ -0,0 +1,16 @@
|
||||
require 'dovecot-lib.pl';
|
||||
|
||||
# config_post_save(&newconfig, &oldconfig)
|
||||
# Called after the module's configuration has been saved
|
||||
sub config_post_save
|
||||
{
|
||||
my ($newconfig, $oldconfig) = @_;
|
||||
my $f = $newconfig->{'add_config'};
|
||||
$f =~ s/^\s+|\s+$//g;
|
||||
if ($f && $f =~ /^\// && !-r $f && !-e $f && !-l $f) {
|
||||
&open_lock_tempfile(ADDCONF, ">$f");
|
||||
&close_tempfile(ADDCONF);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
Reference in New Issue
Block a user