mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-29 04:17:07 +00:00
cleanup
* dont use uswgi * proper dav addresse's * owner wasnt set on log dir * enable on boot
This commit is contained in:
parent
bd2819cdb1
commit
ad295301cb
@ -12,8 +12,6 @@
|
||||
}
|
||||
|
||||
location /radicale {
|
||||
access_log /var/log/radicale/access.log;
|
||||
error_log /var/log/radicale/error.log;
|
||||
proxy_pass http://127.0.0.1:5232;
|
||||
}
|
||||
|
||||
|
@ -13,8 +13,8 @@
|
||||
|
||||
<table class="table">
|
||||
<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>Calendar</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/username@{{hostname}}/caldav">https://{{hostname}}/radicale/username@{{hostname}}/caldav</a></td></tr>
|
||||
</table>
|
||||
|
||||
<p>Log in settings are the same as with <a href="#mail-guide" onclick="return show_panel(this);">mail</a>: your
|
||||
|
@ -9,24 +9,26 @@ source /etc/mailinabox.conf # load global vars
|
||||
|
||||
echo "Installing Radicale (contacts/calendar)..."
|
||||
|
||||
# Cleanup after Owncloud
|
||||
|
||||
if [ -d $STORAGE_ROOT/owncloud ]; then
|
||||
rm -rf $STORAGE_ROOT/owncloud
|
||||
fi
|
||||
# Cleanup after Owncloud install
|
||||
|
||||
if [ -d /usr/local/lib/owncloud ]; then
|
||||
rm -rf /usr/local/lib/owncloud
|
||||
fi
|
||||
|
||||
apt-get purge -qq -y owncloud*
|
||||
|
||||
# Install it
|
||||
apt_install radicale uwsgi uwsgi-core
|
||||
# Install radicale
|
||||
apt_install radicale
|
||||
|
||||
# Create Directories
|
||||
# Create radicale directories and set proper rights
|
||||
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
|
||||
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
|
||||
cat > /etc/radicale/config <<EOF;
|
||||
@ -70,30 +72,5 @@ collection: ^%(login)s/.*$
|
||||
permission: w
|
||||
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 <<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
|
||||
# Reload radicale so that Radicale starts
|
||||
restart_service radicale
|
||||
|
Loading…
Reference in New Issue
Block a user