bundles/radicale: introduce
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2020-10-23 15:22:35 +02:00
parent d76f69ab49
commit a0702416a0
Signed by: kunsi
GPG key ID: 12E3D2136B818350
8 changed files with 112 additions and 2 deletions

View file

@ -0,0 +1,25 @@
[server]
hosts = [::1]:22050
max_connections = 100
[encoding]
request = utf-8
stock = utf-8
[auth]
type = http_x_remote_user
[rights]
type = owner_only
[storage]
type = multifilesystem
filesystem_folder = /var/lib/radicale/collections/
filesystem_locking = True
filesystem_fsync = True
[web]
type = internal
[logging]
mask_passwords = True

View file

@ -0,0 +1,3 @@
% for user, password in users.items():
${user}:${password}
% endfor

View file

@ -0,0 +1,22 @@
[Unit]
Description=A simple CalDAV (calendar) and CardDAV (contact) server
After=network.target
Requires=network.target
[Service]
ExecStart=/usr/bin/env python3 -m radicale
Restart=on-failure
User=radicale
UMask=0027
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
PrivateDevices=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
NoNewPrivileges=true
ReadWritePaths=/var/lib/radicale/collections
[Install]
WantedBy=multi-user.target

41
bundles/radicale/items.py Normal file
View file

@ -0,0 +1,41 @@
directories = {
'/var/lib/radicale/collections': {
'owner': 'radicale',
'group': 'radicale',
'mode': '0700',
},
}
files = {
'/etc/systemd/system/radicale.service': {
'triggers': {
'action:systemd-reload',
'svc_systemd:radicale:restart',
},
},
'/etc/radicale/config': {
'triggers': {
'svc_systemd:radicale:restart',
},
},
'/etc/radicale/htpasswd': {
'content_type': 'mako',
'context': {
'users': node.metadata.get('radicale', {}).get('users', {}),
},
'triggers': {
'svc_systemd:radicale:restart',
},
},
}
svc_systemd = {
'radicale': {
'needs': {
'file:/etc/systemd/system/radicale.service',
'file:/etc/radicale/config',
'file:/etc/radicale/htpasswd',
'pkg_apt:python3-radicale',
},
},
}

View file

@ -0,0 +1,12 @@
defaults = {
'apt': {
'packages': {
'python3-radicale': {},
},
},
'users': {
'radicale': {
'home': '/var/lib/radicale',
},
},
}