1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-29 04:17:07 +00:00
* dont use uswgi
* proper dav addresse's
* owner wasnt set on log dir
* enable on boot
This commit is contained in:
Joel Kåberg 2016-05-24 20:05:31 +02:00
parent bd2819cdb1
commit ad295301cb
3 changed files with 15 additions and 40 deletions

View File

@ -12,8 +12,6 @@
} }
location /radicale { location /radicale {
access_log /var/log/radicale/access.log;
error_log /var/log/radicale/error.log;
proxy_pass http://127.0.0.1:5232; proxy_pass http://127.0.0.1:5232;
} }

View File

@ -13,8 +13,8 @@
<table class="table"> <table class="table">
<thead><tr><th>For...</th> <th>Visit this URL</th></tr></thead> <thead><tr><th>For...</th> <th>Visit this URL</th></tr></thead>
<tr><th>Contacts</td> <td><a href="https://{{hostname}}/radicale/carddav">https://{{hostname}}/radicale/carddav</a></td></tr> <tr><th>Contacts</td> <td><a href="https://{{hostname}}/radicale/username@{{hostname}}/carddav">https://{{hostname}}/radicale/username@{{hostname}}/carddav</a></td></tr>
<tr><th>Calendar</td> <td><a href="https://{{hostname}}/radicale/carddav">https://{{hostname}}/radicale/carddav</a></td></tr> <tr><th>Calendar</td> <td><a href="https://{{hostname}}/radicale/username@{{hostname}}/caldav">https://{{hostname}}/radicale/username@{{hostname}}/caldav</a></td></tr>
</table> </table>
<p>Log in settings are the same as with <a href="#mail-guide" onclick="return show_panel(this);">mail</a>: your <p>Log in settings are the same as with <a href="#mail-guide" onclick="return show_panel(this);">mail</a>: your

View File

@ -9,24 +9,26 @@ source /etc/mailinabox.conf # load global vars
echo "Installing Radicale (contacts/calendar)..." echo "Installing Radicale (contacts/calendar)..."
# Cleanup after Owncloud # Cleanup after Owncloud install
if [ -d $STORAGE_ROOT/owncloud ]; then
rm -rf $STORAGE_ROOT/owncloud
fi
if [ -d /usr/local/lib/owncloud ]; then if [ -d /usr/local/lib/owncloud ]; then
rm -rf /usr/local/lib/owncloud rm -rf /usr/local/lib/owncloud
fi fi
apt-get purge -qq -y owncloud* apt-get purge -qq -y owncloud*
# Install it # Install radicale
apt_install radicale uwsgi uwsgi-core apt_install radicale
# Create Directories # Create radicale directories and set proper rights
mkdir -p $STORAGE_ROOT/radicale/etc/ mkdir -p $STORAGE_ROOT/radicale/etc/
chown -R www-data:www-data $STORAGE_ROOT/radicale
# Create log directory and make radicale owner
mkdir -p /var/log/radicale mkdir -p /var/log/radicale
chown -R radicale:radicale /var/log/radicale
# Enable radicale on boot
sed -i '/#ENABLE_RADICALE=yes/c\ENABLE_RADICALE=yes' /etc/default/radicale
# Radicale Config file # Radicale Config file
cat > /etc/radicale/config <<EOF; cat > /etc/radicale/config <<EOF;
@ -70,30 +72,5 @@ collection: ^%(login)s/.*$
permission: w permission: w
EOF EOF
# WSGI launch file # Reload radicale so that Radicale starts
cat > $STORAGE_ROOT/radicale/radicale.wsgi <<EOF; restart_service radicale
#!/usr/bin/env python
import radicale
radicale.log.start()
application = radicale.Application()
EOF
# UWSGI config file
cat > /etc/uwsgi/apps-available/radicale <<EOF;
[uwsgi]
uid = www-data
gid = www-data
plugins = http, python
wsgi-file = $STORAGE_ROOT/radicale/radicale.wsgi
EOF
# Enabled the uwsgi app
ln -s /etc/uwsgi/apps-available/radicale /etc/uwsgi/apps-enabled/radicale
# Set proper rights
chown -R www-data:www-data $STORAGE_ROOT/radicale
# Reload uwsgi so that Radicale starts
service uwsgi reload