28 lines
644 B
Plaintext
28 lines
644 B
Plaintext
|
{
|
||
|
|
||
|
# migrate of geneweb, gwsetup configuration
|
||
|
my ($rec, $ip, $ip2);
|
||
|
|
||
|
for my $service ( qw( geneweb gwsetup ) ) {
|
||
|
if ( $rec = $DB->get($service) ) {
|
||
|
# change TCPPort attributes to TcpPort
|
||
|
if ( $rec->prop('TCPPort') ) {
|
||
|
$rec->set_prop('TcpPort', $rec->prop('TCPPort'));
|
||
|
$rec->delete_prop('TCPPort');
|
||
|
}
|
||
|
$ip = ($rec->prop('only') || '') if ($service eq 'geneweb');
|
||
|
$ip2 = ($rec->prop('only') || '') if ($service eq 'gwsetup');
|
||
|
}
|
||
|
}
|
||
|
|
||
|
# move 'only' from geneweb to gwsetup if existing
|
||
|
|
||
|
return unless $ip;
|
||
|
|
||
|
$rec = $DB->get('geneweb');
|
||
|
rec->delete_prop('only') if $ip;
|
||
|
|
||
|
$DB->set_prop('gwsetup', 'only', "$ip") unless $ip2;
|
||
|
|
||
|
}
|