initial commit of file from CVS for smeserver-geneweb on Sat Sep 7 19:54:18 AEST 2024

This commit is contained in:
Trevor Batley
2024-09-07 19:54:18 +10:00
parent 1bce18ef70
commit 3100c4d82e
94 changed files with 6132 additions and 2 deletions

View File

@@ -0,0 +1,27 @@
{
# 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;
}