diff --git a/conf/zap.php b/conf/zap.php new file mode 100644 index 0000000..df2ff61 --- /dev/null +++ b/conf/zap.php @@ -0,0 +1 @@ +define('NOMADIC',1); diff --git a/manifest.json b/manifest.json index 00a825c..c1c0629 100755 --- a/manifest.json +++ b/manifest.json @@ -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", diff --git a/scripts/install b/scripts/install index 8d015af..1bd61ef 100755 --- a/scripts/install +++ b/scripts/install @@ -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"