smeserver-coova-chilli/root/etc/e-smith/db/configuration/migrate/60Chilli

17 lines
672 B
Plaintext

{
my $chilliconf = $DB->get('chilli') || $DB->new_record('chilli', {type => 'service'});
my $uamsecret = $chilliconf->prop('uamsecret') || '';
if ($uamsecret eq ''){
$pass=`/usr/bin/openssl rand -base64 60 | tr -c -d '[:graph:]'`;
$chilliconf->set_prop('uamsecret',$pass);
}
# change default dns server as they are not available anymore
# new default is google
my $dns1 = $chilliconf->prop('dns1') || '212.73.209.226';
my $dns2 = $chilliconf->prop('dns2') || '194.206.120.1';
$chilliconf->set_prop('dns1','8.8.8.8') if $dns1 eq '212.73.209.226';
$chilliconf->set_prop('dns2','8.8.4.4') if $dns2 eq '194.206.120.1';
}