initial commit of file from CVS for smeserver-radicale on Sat Sep 7 20:59:16 AEST 2024
This commit is contained in:
@@ -0,0 +1 @@
|
||||
5232
|
@@ -0,0 +1 @@
|
||||
public
|
@@ -0,0 +1 @@
|
||||
False
|
@@ -0,0 +1 @@
|
||||
enabled
|
1
root/etc/e-smith/db/configuration/defaults/radicale/type
Normal file
1
root/etc/e-smith/db/configuration/defaults/radicale/type
Normal file
@@ -0,0 +1 @@
|
||||
service
|
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');
|
4
root/etc/e-smith/templates/etc/hosts.allow/radicale
Normal file
4
root/etc/e-smith/templates/etc/hosts.allow/radicale
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
$DB->hosts_allow_spec('radicale','radicale');
|
||||
}
|
||||
|
24
root/etc/e-smith/templates/etc/radicale/config/10base
Normal file
24
root/etc/e-smith/templates/etc/radicale/config/10base
Normal file
@@ -0,0 +1,24 @@
|
||||
# -*- mode: conf -*-
|
||||
# vim:ft=cfg
|
||||
|
||||
# Config file for Radicale - A simple calendar server
|
||||
#
|
||||
# Place it into /etc/radicale/config (global)
|
||||
# or ~/.config/radicale/config (user)
|
||||
#
|
||||
# The current values are the default ones
|
||||
|
||||
|
||||
[server]
|
||||
|
||||
# CalDAV server hostnames separated by a comma
|
||||
# IPv4 syntax: address:port
|
||||
# IPv6 syntax: [address]:port
|
||||
# For example: 0.0.0.0:9999, [::]:9999
|
||||
# IPv6 adresses are configured to only allow IPv6 connections
|
||||
#hosts = 0.0.0.0:5232
|
||||
{
|
||||
my $rad_ports = $radicale{TCPPort} || 5232;
|
||||
my $rad_ip = $LocalIP || 127.0.0.1;
|
||||
$OUT .= "hosts = $rad_ip:$rad_ports\n";
|
||||
}
|
7
root/etc/e-smith/templates/etc/radicale/config/20daemon
Normal file
7
root/etc/e-smith/templates/etc/radicale/config/20daemon
Normal file
@@ -0,0 +1,7 @@
|
||||
# Daemon flag
|
||||
#daemon = False
|
||||
daemon = True
|
||||
|
||||
# File storing the PID in daemon mode
|
||||
#pid =
|
||||
pid = /run/radicale/radicale.pid
|
8
root/etc/e-smith/templates/etc/radicale/config/30crt
Normal file
8
root/etc/e-smith/templates/etc/radicale/config/30crt
Normal file
@@ -0,0 +1,8 @@
|
||||
# SSL flag, enable HTTPS protocol
|
||||
#ssl = False
|
||||
ssl = True
|
||||
|
||||
# SSL certificate path
|
||||
#certificate = /etc/apache2/ssl/server.crt
|
||||
|
||||
certificate = /home/e-smith/files/radicale/radicale.crt
|
5
root/etc/e-smith/templates/etc/radicale/config/40key
Normal file
5
root/etc/e-smith/templates/etc/radicale/config/40key
Normal file
@@ -0,0 +1,5 @@
|
||||
# SSL private key
|
||||
#key = /etc/apache2/ssl/server.key
|
||||
|
||||
key = /home/e-smith/files/radicale/radicale.key
|
||||
|
165
root/etc/e-smith/templates/etc/radicale/config/50miscelanious
Normal file
165
root/etc/e-smith/templates/etc/radicale/config/50miscelanious
Normal file
@@ -0,0 +1,165 @@
|
||||
# SSL Protocol used. See python's ssl module for available values
|
||||
#protocol = PROTOCOL_SSLv23
|
||||
|
||||
# Ciphers available. See python's ssl module for available ciphers
|
||||
#ciphers =
|
||||
|
||||
# Reverse DNS to resolve client address in logs
|
||||
#dns_lookup = True
|
||||
dns_lookup = True
|
||||
|
||||
# Root URL of Radicale (starting and ending with a slash)
|
||||
#base_prefix = /
|
||||
|
||||
# Possibility to allow URLs cleaned by a HTTP server, without the base_prefix
|
||||
#can_skip_base_prefix = False
|
||||
|
||||
# Message displayed in the client when a password is needed
|
||||
#realm = Radicale - Password Required
|
||||
|
||||
|
||||
[encoding]
|
||||
|
||||
# Encoding for responding requests
|
||||
request = utf-8
|
||||
|
||||
# Encoding for storing local collections
|
||||
stock = utf-8
|
||||
|
||||
|
||||
[well-known]
|
||||
|
||||
# Path where /.well-known/caldav/ is redirected
|
||||
#caldav = '/%(user)s/caldav/'
|
||||
|
||||
# Path where /.well-known/carddav/ is redirected
|
||||
#carddav = '/%(user)s/carddav/'
|
||||
|
||||
|
||||
[auth]
|
||||
|
||||
# Authentication method
|
||||
# Value: None | htpasswd | IMAP | LDAP | PAM | courier | http | remote_user | custom
|
||||
#type = None
|
||||
type = IMAP
|
||||
|
||||
# Custom authentication handler
|
||||
# custom_handler =
|
||||
|
||||
# Htpasswd filename
|
||||
#htpasswd_filename = /etc/radicale/users
|
||||
|
||||
# Htpasswd encryption method
|
||||
# Value: plain | sha1 | ssha | crypt
|
||||
#htpasswd_encryption = crypt
|
||||
|
||||
# LDAP server URL, with protocol and port
|
||||
#ldap_url = ldap://localhost:389/
|
||||
|
||||
# LDAP base path
|
||||
#ldap_base = ou=users,dc=example,dc=com
|
||||
|
||||
# LDAP login attribute
|
||||
#ldap_attribute = uid
|
||||
|
||||
# LDAP filter string
|
||||
# placed as X in a query of the form (&(...)X)
|
||||
# example: (objectCategory=Person)(objectClass=User)(memberOf=cn=calenderusers,ou=users,dc=example,dc=org)
|
||||
# leave empty if no additional filter is needed
|
||||
#ldap_filter =
|
||||
|
||||
# LDAP dn for initial login, used if LDAP server does not allow anonymous searches
|
||||
# Leave empty if searches are anonymous
|
||||
#ldap_binddn =
|
||||
|
||||
# LDAP password for initial login, used with ldap_binddn
|
||||
#ldap_password =
|
||||
|
||||
# LDAP scope of the search
|
||||
#ldap_scope = OneLevel
|
||||
|
||||
# IMAP Configuration
|
||||
#imap_hostname = localhost
|
||||
#imap_port = 143
|
||||
#imap_ssl = False
|
||||
imap_hostname = localhost
|
||||
imap_port = {$imaps{'TCPPort'} || '993'}
|
||||
imap_ssl = True
|
||||
|
||||
# PAM group user should be member of
|
||||
#pam_group_membership =
|
||||
|
||||
# Path to the Courier Authdaemon socket
|
||||
#courier_socket =
|
||||
|
||||
# HTTP authentication request URL endpoint
|
||||
#http_url =
|
||||
# POST parameter to use for username
|
||||
#http_user_parameter =
|
||||
# POST parameter to use for password
|
||||
#http_password_parameter =
|
||||
|
||||
|
||||
[git]
|
||||
|
||||
# Git default options
|
||||
#committer = Radicale <radicale@example.com>
|
||||
|
||||
|
||||
[rights]
|
||||
|
||||
# Rights backend
|
||||
# Value: None | authenticated | owner_only | owner_write | from_file | custom
|
||||
#type = None
|
||||
type = owner_write
|
||||
|
||||
# Custom rights handler
|
||||
# custom_handler =
|
||||
|
||||
# File for rights management from_file
|
||||
#file = ~/.config/radicale/rights
|
||||
|
||||
|
||||
[storage]
|
||||
|
||||
# Storage backend
|
||||
# -------
|
||||
# WARNING: ONLY "filesystem" IS DOCUMENTED AND TESTED,
|
||||
# OTHER BACKENDS ARE NOT READY FOR PRODUCTION.
|
||||
# -------
|
||||
# Value: filesystem | multifilesystem | database | custom
|
||||
#type = filesystem
|
||||
|
||||
# Custom storage handler
|
||||
#custom_handler =
|
||||
|
||||
# Folder for storing local collections, created if not present
|
||||
#filesystem_folder = ~/.config/radicale/collections
|
||||
filesystem_folder = /home/e-smith/files/radicale/collections
|
||||
|
||||
# Database URL for SQLAlchemy
|
||||
# dialect+driver://user:password@host/dbname[?key=value..]
|
||||
# For example: sqlite:///var/db/radicale.db, postgresql://user:password@localhost/radicale
|
||||
# See http://docs.sqlalchemy.org/en/rel_0_8/core/engines.html#sqlalchemy.create_engine
|
||||
#database_url =
|
||||
|
||||
|
||||
[logging]
|
||||
|
||||
# Logging configuration file
|
||||
# If no config is given, simple information is printed on the standard output
|
||||
# For more information about the syntax of the configuration file, see:
|
||||
# http://docs.python.org/library/logging.config.html
|
||||
#config = /etc/radicale/logging
|
||||
config = /etc/radicale/logging
|
||||
# Set the default logging level to debug
|
||||
debug = {$radicale{'debug'} || 'False'}
|
||||
# Store all environment variables (including those set in the shell)
|
||||
#full_environment = False
|
||||
|
||||
|
||||
[headers]
|
||||
|
||||
# Additional HTTP headers
|
||||
#Access-Control-Allow-Origin = *#imap_hostname = localhost
|
||||
|
23
root/etc/e-smith/templates/etc/radicale/logging/10base
Normal file
23
root/etc/e-smith/templates/etc/radicale/logging/10base
Normal file
@@ -0,0 +1,23 @@
|
||||
[loggers]
|
||||
keys=root
|
||||
level=NOTSET
|
||||
|
||||
[logger_root]
|
||||
handlers=file
|
||||
|
||||
[formatters]
|
||||
keys=simple
|
||||
|
||||
[formatter_simple]
|
||||
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
|
||||
|
||||
[handlers]
|
||||
keys=file
|
||||
|
||||
[handler_file]
|
||||
class=handlers.TimedRotatingFileHandler
|
||||
interval=midnight
|
||||
backupCount=5
|
||||
formatter=simple
|
||||
level=ERROR
|
||||
args=('/var/log/radicale/radicale.log',)
|
7
root/etc/e-smith/templates/etc/services/40radicale
Normal file
7
root/etc/e-smith/templates/etc/services/40radicale
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
my $port = $radicale{TCPPort} || '5232';
|
||||
$OUT .= << "EOF";
|
||||
#Radicale
|
||||
radicale $port/tcp
|
||||
EOF
|
||||
}
|
14
root/usr/lib/systemd/system/radicale.service
Normal file
14
root/usr/lib/systemd/system/radicale.service
Normal file
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=radicale
|
||||
After=syslog.target network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStartPre=-/usr/sbin/e-smith/service-status radicale
|
||||
ExecStart=/usr/local/bin/radicale -C /etc/radicale/config
|
||||
PIDFile=/run/radicale/radicale.pid
|
||||
Type=simple
|
||||
User=radicale
|
||||
PermissionsStartOnly=true
|
||||
|
||||
[Install]
|
||||
WantedBy=sme-server.target
|
1
root/usr/lib/tmpfiles.d/radicale.conf
Normal file
1
root/usr/lib/tmpfiles.d/radicale.conf
Normal file
@@ -0,0 +1 @@
|
||||
d /run/radicale 0755 radicale radicale
|
Reference in New Issue
Block a user