28 lines
596 B
Plaintext
28 lines
596 B
Plaintext
{
|
|
my $ftp = $DB->get('ftp');
|
|
return unless defined $ftp;
|
|
|
|
my $access = $ftp->prop('accessLimits');
|
|
return unless defined $access; # New or already migrated server
|
|
|
|
my $login = $ftp->prop('access') || 'private';
|
|
my $status = $ftp->prop('status') || 'disabled';
|
|
if ($access eq "normal")
|
|
{
|
|
$status = 'enabled';
|
|
$access = 'public';
|
|
}
|
|
if ($access eq "off")
|
|
{
|
|
$status = 'disabled';
|
|
$access = 'private';
|
|
}
|
|
|
|
$ftp->delete_prop('accessLimits');
|
|
$ftp->merge_props(
|
|
LoginAccess => $login,
|
|
access => $access,
|
|
status => $status,
|
|
);
|
|
}
|