1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/radicale_ynh.git synced 2024-09-03 20:16:14 +02:00
radicale_ynh/scripts/install

47 lines
1 KiB
Text
Raw Normal View History

2013-11-28 17:44:39 +01:00
#!/bin/bash
# Retrieve arguments
domain=$1
path=$2
# Check domain/path availability
2013-11-28 19:24:55 +01:00
# yunohost app checkurl $domain$path -a radicale
2013-11-28 17:44:39 +01:00
#if [[ ! $? -eq 0 ]]; then
# exit 1
#fi
2013-11-28 19:24:55 +01:00
# Check depends installation
for i in python-pip python-virtualenv python-ldap
do
dpkg -l | grep $i > /dev/null 2>&1
if [ $? = 1 ];
then
sudo apt-get install $i -y
fi
done
2013-11-28 17:44:39 +01:00
# Init virtualenv
sudo virtualenv /usr/local/radicale
2013-11-28 19:24:55 +01:00
sudo bash -c "source /usr/local/radicale/bin/activate && pip install radicale flup"
2013-11-28 17:44:39 +01:00
2013-11-28 19:24:55 +01:00
#Configuration Radicale
if [ ! -d /etc/radicale ];
then
mkdir /etc/radicale
fi
cp ../conf/{radicale,logging) /etc/radicale/
2013-11-28 17:44:39 +01:00
# Set permissions to radicale directory
2013-11-28 19:24:55 +01:00
# chown -R www-data: $final_path
2013-11-28 17:44:39 +01:00
#
## 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
2013-11-28 19:24:55 +01:00
# cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/radicale.conf
2013-11-28 17:44:39 +01:00
#
## Reload Nginx and regenerate SSOwat conf
2013-11-28 19:24:55 +01:00
# service nginx reload
# yunohost app ssowatconf
2013-11-28 17:44:39 +01:00