initial commit of file from CVS for smeserver-bandwidthd on Sat Sep 7 20:10:36 AEST 2024

This commit is contained in:
Trevor Batley
2024-09-07 20:10:36 +10:00
parent 39d69687d3
commit bd26bff825
36 changed files with 707 additions and 2 deletions

View File

@@ -0,0 +1 @@
bandwidthd

View File

@@ -0,0 +1 @@
bandwidthd

View File

@@ -0,0 +1 @@
bandwidthd

View File

@@ -0,0 +1 @@
enabled

View File

@@ -0,0 +1 @@
service

View File

@@ -0,0 +1 @@
private

View File

@@ -0,0 +1,16 @@
{
use MIME::Base64 qw(encode_base64);
my $rec = $DB->get('bandwidthd') || $DB->new_record('bandwidthd', {type => 'service'});
if (my $grapCutofff = $DB->get_prop_and_delete('bandwidthd', 'grapCutofff')) {
$rec->merge_props('grapCutoff', $grapCutofff);
}
my $pw = $rec->prop('DbPassword');
return "" if $pw;
$pw = MIME::Base64::encode(int( (1000000000000000) * rand() ));
chomp($pw);
$rec->set_prop('DbPassword', "$pw" );
}