initial commit of file from CVS for smeserver-radicale on Sat Sep 7 20:59:16 AEST 2024
This commit is contained in:
19
root/etc/e-smith/events/actions/radicale-pip-upgrade
Normal file
19
root/etc/e-smith/events/actions/radicale-pip-upgrade
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/perl
|
||||
use strict;
|
||||
use warnings;
|
||||
use esmith::ConfigDB;
|
||||
|
||||
my $db = esmith::ConfigDB->open_ro;
|
||||
|
||||
if (( ! -f '/home/e-smith/files/radicale/radicale.cert' ) && ( ! -f '/home/e-smith/files/radicale/radicale.key'))
|
||||
{
|
||||
my $rad_name = $db->get_value('SystemName') || "server";
|
||||
my $rad_domain = $db->get_value('DomainName') || 'myexample.com';
|
||||
|
||||
system ("openssl req -new -sha256 -newkey rsa:4096 -days 3650 -nodes -x509 -subj /O=Radicale/CN=$rad_name.$rad_domain -keyout /home/e-smith/files/radicale/radicale.key -out /home/e-smith/files/radicale/radicale.crt") == 0
|
||||
|| die "impossible to create the ssl certificate";
|
||||
system ('chown radicale:radicale /home/e-smith/files/radicale/radicale.*');
|
||||
system ('chmod 400 /home/e-smith/files/radicale/radicale.*');
|
||||
}
|
||||
|
||||
system ('/usr/bin/pip3.6 install --upgrade pip radicale==1.1.7');
|
Reference in New Issue
Block a user