1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/osada_ynh.git synced 2024-09-03 19:46:30 +02:00

Added Osada and Zap protocl option

This commit is contained in:
anmol 2018-11-04 05:50:27 +05:30
parent 95de6c08fc
commit 7d4ea3a479
3 changed files with 17 additions and 0 deletions

1
conf/zap.php Normal file
View file

@ -0,0 +1 @@
define('NOMADIC',1);

View file

@ -32,6 +32,14 @@
"fr": "Indiquez un domain pour Osada. Osada doit être installé à la racine du domaine. Cela implique qu'aucune autre app ne pourra être installée ou accessible sur ce domain. Nous conseillons un sous-domaine dédié par exemple osada.domain.tld."
}
},
{
"name": "protocol",
"ask": {
"en": "Choose the protocol OSADA or ZAP (Osada can connect with other network like Mastodon,Plome,Peertube,Funkwhale but loose the abilty to no-madic identity. Zap has the no-madic abilty but will not connect to other networks thus is more secure."
},
"choices": ["osada","zap"],
"default": "osada"
},
{
"name": "admin",
"type": "user",

View file

@ -24,6 +24,7 @@ domain=$YNH_APP_ARG_DOMAIN
path_url="/"
admin=$YNH_APP_ARG_ADMIN
email=$(sudo yunohost user info $admin | grep "mail:" | cut -d' ' -f2)
protocol=$YNH_APP_ARG_PROTOCOL
upload="256M"
database="1"
@ -60,6 +61,7 @@ ynh_app_setting_set $app path $path_url
ynh_app_setting_set $app admin $admin
ynh_app_setting_set $app email $email
ynh_app_setting_set $app upload $upload
ynh_app_setting_set $app protocol $protocol
ynh_app_setting_set $app database $database
@ -110,6 +112,12 @@ sudo sed -i "s@//ini_set('error_log','php.out');@ini_set('error_log','php.log');
sudo sed -i "s@//ini_set('log_errors','1');@ini_set('log_errors','1');@g" $final_path/.htconfig.php
sudo sed -i "s@//ini_set('display_errors', '0');@ini_set('display_errors', '0');@g" $final_path/.htconfig.php
# Set THE PROTOCOL TO USE
if [ "$protocol" = "zap" ]; then
# setup application config
sudo su -c "cat ../conf/zap.php >> $final_path/.htconfig.php"
fi
# addon ldap config
sudo su -c "cat ../conf/ldap_conf.php >> $final_path/.htconfig.php"