mirror of
https://github.com/YunoHost-Apps/radicale_ynh.git
synced 2024-09-03 20:16:14 +02:00
49 lines
1 KiB
Text
49 lines
1 KiB
Text
|
#!/bin/bash
|
||
|
|
||
|
# Retrieve arguments
|
||
|
domain=$1
|
||
|
path=$2
|
||
|
|
||
|
# Check domain/path availability
|
||
|
#sudo yunohost app checkurl $domain$path -a radicale
|
||
|
#if [[ ! $? -eq 0 ]]; then
|
||
|
# exit 1
|
||
|
#fi
|
||
|
|
||
|
# Check pip installation
|
||
|
dpkg -l | grep python-pip > /dev/null 2>&1
|
||
|
if [ $? = 1 ];
|
||
|
then
|
||
|
sudo apt-get install python-pip -y
|
||
|
fi
|
||
|
|
||
|
dpkg -l | grep python-virtualenv > /dev/null 2>&1
|
||
|
if [ $? = 1 ];
|
||
|
then
|
||
|
sudo apt-get install python-virtualenv -y
|
||
|
fi
|
||
|
|
||
|
# Init virtualenv
|
||
|
sudo virtualenv /usr/local/radicale
|
||
|
source /usr/local/radicale/bin/activate
|
||
|
|
||
|
# Install uwsgi
|
||
|
sudo pip install uwsgi==1.9.20
|
||
|
|
||
|
# Install radiace
|
||
|
sudo pip install radicale==0.8
|
||
|
|
||
|
# Set permissions to radicale directory
|
||
|
#sudo chown -R www-data: $final_path
|
||
|
#
|
||
|
## Modify Nginx configuration file and copy it to Nginx conf directory
|
||
|
#sed -i "s@PATHTOCHANGE@$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
|
||
|
#
|
||
|
## Reload Nginx and regenerate SSOwat conf
|
||
|
#sudo service nginx reload
|
||
|
#sudo yunohost app ssowatconf
|
||
|
|
||
|
|