initial commit of file from CVS for smeserver-nextcloud on Sat Sep 7 20:46:17 AEST 2024
This commit is contained in:
16
root/etc/e-smith/db/configuration/migrate/nextcloud
Normal file
16
root/etc/e-smith/db/configuration/migrate/nextcloud
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
|
||||
my $nextcloud = $DB->get('nextcloud') || $DB->new_record('nextcloud', {type => 'service'});
|
||||
|
||||
my $dbpass = $nextcloud->prop('DbPassword') ||
|
||||
$nextcloud->set_prop('DbPassword', `/usr/bin/openssl rand -base64 40 | /usr/bin/tr -c -d '[:graph:]'`);
|
||||
my $dbAdminPass = $nextcloud->prop('AdminPassword') ||
|
||||
$nextcloud->set_prop('AdminPassword', `/usr/bin/openssl rand -base64 40 | /usr/bin/tr -c -d '[:graph:]'`);
|
||||
|
||||
if (my $CloudDomain = $DB->get_prop_and_delete('nextcloud', 'CloudDomain')) {
|
||||
$nextcloud->merge_props('VirtualHost', $CloudDomain);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user