Install Seafile as public app for access from desktop or mobile app

Former-commit-id: 97a22a7b15
This commit is contained in:
Elie 2014-08-14 21:10:10 -04:00
parent 84466679d2
commit 5f78f09c81
3 changed files with 22 additions and 3 deletions

View file

@ -49,6 +49,15 @@
"en": "Enter a password for the administrator" "en": "Enter a password for the administrator"
}, },
"example": "**Sup3rS3cr3t**" "example": "**Sup3rS3cr3t**"
},
{
"name": "public_site",
"ask": {
"en": "Is it a public site ?",
"fr": "Est-ce un site public ?"
},
"choices": ["Yes", "No"],
"default": "Yes"
} }
] ]
} }

View file

@ -4,6 +4,7 @@ path=$2
server_name=$3 server_name=$3
admin_email=$4 admin_email=$4
admin_password=$5 admin_password=$5
is_public=$6
final_path=/var/www/seafile final_path=/var/www/seafile
seafile_data=$final_path/seafile-data seafile_data=$final_path/seafile-data
seafile_version=3.1.1 seafile_version=3.1.1
@ -60,6 +61,8 @@ sudo yunohost app setting seafile seafile_port -v $seafile_port
sudo yunohost app setting seafile seafile_fileserver_port -v $seafile_fileserver_port sudo yunohost app setting seafile seafile_fileserver_port -v $seafile_fileserver_port
sudo yunohost app setting seafile seahub_port -v $seahub_port sudo yunohost app setting seafile seahub_port -v $seahub_port
sudo yunohost app setting seafile is_public -v $is_public
# Modify install script with parameters # Modify install script with parameters
sed -i "s@SERVER_NAME@$server_name@g" ../sources/setup-seafile.sh sed -i "s@SERVER_NAME@$server_name@g" ../sources/setup-seafile.sh
@ -126,3 +129,10 @@ sudo yunohost firewall allow $seafile_port
sudo yunohost firewall allow $seahub_port sudo yunohost firewall allow $seahub_port
if [ "$is_public" = "No" ];
then
sudo yunohost app setting seafile skipped_uris -d
sudo yunohost app ssowatconf
else
sudo yunohost app setting seafile skipped_uris -v "/"
fi

View file

@ -14,6 +14,6 @@ ccnet_port=$(sudo yunohost app setting seafile ccnet_port)
seafile_port=$(sudo yunohost app setting seafile seafile_port) seafile_port=$(sudo yunohost app setting seafile seafile_port)
seahub_port=$(sudo yunohost app setting seafile seahub_port) seahub_port=$(sudo yunohost app setting seafile seahub_port)
sudo yunohost firewall deny $ccnet_port sudo yunohost firewall disallow $ccnet_port
sudo yunohost firewall deny $seafile_port sudo yunohost firewall disallow $seafile_port
sudo yunohost firewall deny $seahub_port sudo yunohost firewall disallow $seahub_port