mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-21 03:02:09 +00:00
initial radicale commit
This commit is contained in:
parent
efac602e1f
commit
491701f0f6
@ -11,9 +11,11 @@
|
||||
add_header Content-Security-Policy "frame-ancestors 'none';";
|
||||
}
|
||||
|
||||
rewrite ^/.well-known/host-meta /cloud/public.php?service=host-meta last;
|
||||
rewrite ^/.well-known/host-meta.json /cloud/public.php?service=host-meta-json last;
|
||||
rewrite ^/.well-known/carddav /cloud/remote.php/carddav/ redirect;
|
||||
rewrite ^/.well-known/caldav /cloud/remote.php/caldav/ redirect;
|
||||
location /radicale {
|
||||
uwsgi_pass unix:///tmp/radicale.sock;
|
||||
}
|
||||
|
||||
#rewrite ^/.well-known/carddav /cloud/remote.php/carddav/ redirect; <-- fix this
|
||||
#rewrite ^/.well-known/caldav /cloud/remote.php/caldav/ redirect; <-- fix this
|
||||
|
||||
# ADDITIONAL DIRECTIVES HERE
|
||||
|
109
setup/radicale.sh
Normal file
109
setup/radicale.sh
Normal file
@ -0,0 +1,109 @@
|
||||
#!/bin/bash
|
||||
# Radicale
|
||||
##########################
|
||||
|
||||
source setup/functions.sh # load our functions
|
||||
source /etc/mailinabox.conf # load global vars
|
||||
|
||||
# ### Installing Radicale
|
||||
|
||||
echo "Installing Radicale (contacts/calendar)..."
|
||||
|
||||
# Cleanup after Owncloud
|
||||
|
||||
if [ -d $STORAGE_ROOT/owncloud ]; then
|
||||
rm -rf $STORAGE_ROOT/owncloud
|
||||
fi
|
||||
|
||||
if [ -d /usr/local/lib/owncloud ]; then
|
||||
rm -rf /usr/local/lib/owncloud
|
||||
fi
|
||||
|
||||
apt-get purge -qq -y owncloud*
|
||||
|
||||
# Install it
|
||||
apt_install install -y radicale uwsgi uwsgi-plugin-http uwsgi-plugin-python
|
||||
|
||||
# Create Directories
|
||||
mkdir -p $STORAGE_ROOT/radicale/etc/
|
||||
mkdir -p /var/log/radicale
|
||||
|
||||
# Radicale Config file
|
||||
cat > /etc/radicale/config <<EOF;
|
||||
[server]
|
||||
hosts = 127.0.0.1:5232
|
||||
daemon = True
|
||||
base_prefix = /radicale/
|
||||
can_skip_base_prefix = False
|
||||
[well-known]
|
||||
caldav = '/%(user)s/caldav/'
|
||||
carddav = '/%(user)s/carddav/'
|
||||
[auth]
|
||||
type = IMAP
|
||||
imap_hostname = localhost
|
||||
imap_port = 993
|
||||
imap_ssl = True
|
||||
[rights]
|
||||
type = from_file
|
||||
file = $STORAGE_ROOT/radicale/etc/rights
|
||||
[storage]
|
||||
filesystem_folder = $STORAGE_ROOT/radicale/collections
|
||||
[logging]
|
||||
config = $STORAGE_ROOT/radicale/etc/logging
|
||||
#debug = True
|
||||
EOF
|
||||
|
||||
# Logging config
|
||||
cat > $STORAGE_ROOT/radicale/etc/logging <<EOF;
|
||||
# Logging
|
||||
[loggers]
|
||||
keys = root
|
||||
[handlers]
|
||||
keys = console,file
|
||||
[formatters]
|
||||
keys = simple,full
|
||||
[logger_root]
|
||||
level = DEBUG
|
||||
handlers = file
|
||||
[handler_console]
|
||||
class = StreamHandler
|
||||
level = DEBUG
|
||||
args = (sys.stdout,)
|
||||
formatter = simple
|
||||
[handler_file]
|
||||
class = FileHandler
|
||||
args = ('$STORAGE_ROOT/radicale/radicale.log',)
|
||||
level = INFO
|
||||
formatter = full
|
||||
[formatter_simple]
|
||||
format = %(message)s
|
||||
[formatter_full]
|
||||
format = %(asctime)s - %(levelname)s: %(message)s
|
||||
EOF
|
||||
|
||||
# WSGI launch file
|
||||
cat > $STORAGE_ROOT/radicale/radicale.wsgi <<EOF;
|
||||
#!/usr/bin/env python
|
||||
|
||||
import radicale
|
||||
|
||||
radicale.log.start()
|
||||
application = radicale.Application()
|
||||
EOF
|
||||
|
||||
# UWSGI config file
|
||||
cat > /etc/uwsgi/apps-available/radicale.ini <<EOF;
|
||||
[uwsgi]
|
||||
uid = www-data
|
||||
gid = www-data
|
||||
socket = /tmp/radicale.sock
|
||||
plugins = http, python
|
||||
wsgi-file = $STORAGE_ROOT/radicale/radicale.wsgi
|
||||
pidfile = $STORAGE_ROOT/radicale/radicale.pid
|
||||
EOF
|
||||
|
||||
# Set proper rights
|
||||
chown -R www-data:www-data $STORAGE_ROOT/radicale
|
||||
|
||||
# Reload Radicale
|
||||
uwsgi --reload $STORAGE_ROOT/radicale/radicale.pid
|
@ -106,7 +106,7 @@ source setup/dkim.sh
|
||||
source setup/spamassassin.sh
|
||||
source setup/web.sh
|
||||
source setup/webmail.sh
|
||||
source setup/owncloud.sh
|
||||
source setup/radicale.sh
|
||||
source setup/zpush.sh
|
||||
source setup/management.sh
|
||||
source setup/munin.sh
|
||||
|
Loading…
Reference in New Issue
Block a user