mirror of
https://github.com/YunoHost-Apps/radicale_ynh.git
synced 2024-09-03 20:16:14 +02:00
update apps
This commit is contained in:
parent
ef3c3b08a5
commit
9c1e9babf3
4 changed files with 55 additions and 42 deletions
34
conf/radicale.fcgi
Normal file
34
conf/radicale.fcgi
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# This file is part of Radicale Server - Calendar Server
|
||||||
|
# Copyright © 2011-2013 Guillaume Ayoub
|
||||||
|
#
|
||||||
|
# This library is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Radicale. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
"""
|
||||||
|
Radicale FastCGI Example.
|
||||||
|
|
||||||
|
Launch a Radicale FastCGI server according to configuration.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
from flup.server.fcgi import WSGIServer
|
||||||
|
import radicale
|
||||||
|
|
||||||
|
|
||||||
|
radicale.log.start()
|
||||||
|
radicale.log.LOGGER.info("Starting Radicale FastCGI server")
|
||||||
|
WSGIServer(radicale.Application()).run()
|
||||||
|
radicale.log.LOGGER.info("Stopping Radicale FastCGI server")
|
|
@ -1,4 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
import radicale
|
|
||||||
radicale.log.start()
|
|
||||||
application = radicale.Application()
|
|
|
@ -1,15 +0,0 @@
|
||||||
uwsgi_param QUERY_STRING $query_string;
|
|
||||||
uwsgi_param REQUEST_METHOD $request_method;
|
|
||||||
uwsgi_param CONTENT_TYPE $content_type;
|
|
||||||
uwsgi_param CONTENT_LENGTH $content_length;
|
|
||||||
|
|
||||||
uwsgi_param REQUEST_URI $request_uri;
|
|
||||||
uwsgi_param PATH_INFO $document_uri;
|
|
||||||
uwsgi_param DOCUMENT_ROOT $document_root;
|
|
||||||
uwsgi_param SERVER_PROTOCOL $server_protocol;
|
|
||||||
uwsgi_param HTTPS $https if_not_empty;
|
|
||||||
|
|
||||||
uwsgi_param REMOTE_ADDR $remote_addr;
|
|
||||||
uwsgi_param REMOTE_PORT $remote_port;
|
|
||||||
uwsgi_param SERVER_PORT $server_port;
|
|
||||||
uwsgi_param SERVER_NAME $server_name;
|
|
|
@ -5,44 +5,42 @@ domain=$1
|
||||||
path=$2
|
path=$2
|
||||||
|
|
||||||
# Check domain/path availability
|
# Check domain/path availability
|
||||||
#sudo yunohost app checkurl $domain$path -a radicale
|
# yunohost app checkurl $domain$path -a radicale
|
||||||
#if [[ ! $? -eq 0 ]]; then
|
#if [[ ! $? -eq 0 ]]; then
|
||||||
# exit 1
|
# exit 1
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
# Check pip installation
|
# Check depends installation
|
||||||
dpkg -l | grep python-pip > /dev/null 2>&1
|
for i in python-pip python-virtualenv python-ldap
|
||||||
|
do
|
||||||
|
dpkg -l | grep $i > /dev/null 2>&1
|
||||||
if [ $? = 1 ];
|
if [ $? = 1 ];
|
||||||
then
|
then
|
||||||
sudo apt-get install python-pip -y
|
sudo apt-get install $i -y
|
||||||
fi
|
|
||||||
|
|
||||||
dpkg -l | grep python-virtualenv > /dev/null 2>&1
|
|
||||||
if [ $? = 1 ];
|
|
||||||
then
|
|
||||||
sudo apt-get install python-virtualenv -y
|
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# Init virtualenv
|
# Init virtualenv
|
||||||
sudo virtualenv /usr/local/radicale
|
sudo virtualenv /usr/local/radicale
|
||||||
source /usr/local/radicale/bin/activate
|
sudo bash -c "source /usr/local/radicale/bin/activate && pip install radicale flup"
|
||||||
|
|
||||||
# Install uwsgi
|
#Configuration Radicale
|
||||||
sudo pip install uwsgi==1.9.20
|
if [ ! -d /etc/radicale ];
|
||||||
|
then
|
||||||
# Install radiace
|
mkdir /etc/radicale
|
||||||
sudo pip install radicale==0.8
|
fi
|
||||||
|
cp ../conf/{radicale,logging) /etc/radicale/
|
||||||
|
|
||||||
# Set permissions to radicale directory
|
# Set permissions to radicale directory
|
||||||
#sudo chown -R www-data: $final_path
|
# chown -R www-data: $final_path
|
||||||
#
|
#
|
||||||
## Modify Nginx configuration file and copy it to Nginx conf directory
|
## Modify Nginx configuration file and copy it to Nginx conf directory
|
||||||
#sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
#sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
||||||
#sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf
|
#sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf
|
||||||
#sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/radicale.conf
|
# cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/radicale.conf
|
||||||
#
|
#
|
||||||
## Reload Nginx and regenerate SSOwat conf
|
## Reload Nginx and regenerate SSOwat conf
|
||||||
#sudo service nginx reload
|
# service nginx reload
|
||||||
#sudo yunohost app ssowatconf
|
# yunohost app ssowatconf
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue