smeserver-openvpn-bridge/root/etc/e-smith/db/configuration/migrate/50openvpn-cipher

17 lines
518 B
Plaintext

{
#migrate cipher to Cipher that is used in all other openvpn contribs
my $opv = $DB->get('openvpn-bridge') || $DB->new_record('openvpn-bridge', {type => 'service'});
my %old2new = (
'cipher' => "Cipher",
);
for my $keyt ( keys %old2new )
{
next unless ( $opv->prop($keyt) );
my $value = $DB->get_prop_and_delete('openvpn-bridge', $keyt);
next if ( $opv->prop($old2new{$keyt}) );
$DB->set_prop('openvpn-bridge', $old2new{$keyt}, $value);
}
}