diff --git a/check_process b/check_process index 219b38c..2db3fc6 100644 --- a/check_process +++ b/check_process @@ -5,13 +5,16 @@ path="/path" (PATH) is_public=1 (PUBLIC|public=1|private=0) language="fr" + ; pre-install + sudo yunohost domain add --verbose baikaldomain.tld --admin-password $PASSWORD + sudo yunohost app install baikal -a "domain=baikaldomain.tld&path=/baikal&password=admin" ; Checks pkg_linter=1 setup_sub_dir=1 - setup_root=0 + setup_root=1 setup_nourl=0 setup_private=1 - setup_public=1 + setup_public=0 upgrade=1 backup_restore=1 multi_instance=1 diff --git a/manifest.json b/manifest.json index 63dd6d8..2c57fe1 100644 --- a/manifest.json +++ b/manifest.json @@ -43,14 +43,6 @@ "example": "/agendav", "default": "/agendav" }, - { - "name": "is_public", - "type": "boolean", - "ask": { - "en": "Should Agendav be publicly accessible?" - }, - "default": "0" - }, { "name": "language", "ask": { diff --git a/scripts/install b/scripts/install index f07bd32..0fb3bb7 100644 --- a/scripts/install +++ b/scripts/install @@ -13,7 +13,6 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH language=$YNH_APP_ARG_LANGUAGE -is_public=$YNH_APP_ARG_IS_PUBLIC # Set app specific variables app=$YNH_APP_INSTANCE_NAME @@ -26,7 +25,6 @@ path_url=$(ynh_normalize_url_path "$path_url") language=${LANGUAGES[$language]} ynh_app_setting_set "$app" language "$language" -ynh_app_setting_set "$app" is_public "$is_public" ynh_app_setting_set "$app" path "$path_url" # Check web path availability @@ -87,7 +85,7 @@ caldav_url="https://${caldav_domain}${caldav_path%/}" sed -i "s@{CALDAV_BASEURL}@${caldav_url}${caldav_baseurl}@g" "$conf_path" sed -i "s@{CALDAV_DOMAIN}@${caldav_domain}@g" "$conf_path" -ynh_system_user_create "$app" "$final_path" +ynh_system_user_create "$app" # Protect source code against modifications find "${final_path}" -type f -exec chown root:root {} \; -exec chmod 644 {} \; @@ -120,21 +118,7 @@ ynh_add_nginx_config # Copy and set php-fpm configuration ynh_add_fpm_config -if [ "$is_public" -eq 0 ] -then # Remove the public access - ynh_app_setting_delete "$app" skipped_uris -fi -# Make app public if necessary -if [ "$is_public" -eq 1 ] -then - # unprotected_uris allows SSO credentials to be passed anyway. - ynh_app_setting_set "$app" unprotected_uris "/" - - # ynh panel is not needed - ynh_replace_string " include conf.d/" " #include conf.d/" "$finalnginxconf" - - ynh_store_file_checksum "$finalnginxconf" -fi +ynh_app_setting_delete "$app" skipped_uris # Reload services service php5-fpm restart diff --git a/scripts/upgrade b/scripts/upgrade index ae137af..4df9276 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,7 +20,6 @@ path_url=$(ynh_app_setting_get "$app" path) dbpass=$(ynh_app_setting_get "$app" mysqlpwd) encryptkey=$(ynh_app_setting_get "$app" encryptkey) language=$(ynh_app_setting_get "$app" language) -is_public=$(ynh_app_setting_get "$app" is_public) # Set and store language if [[ -z "$language" ]]; then @@ -108,21 +107,7 @@ ynh_add_nginx_config # Copy and set php-fpm configuration ynh_add_fpm_config -if [ $is_public -eq 0 ] -then # Remove the public access - ynh_app_setting_delete "$app" skipped_uris -fi -# Make app public if necessary -if [ $is_public -eq 1 ] -then - # unprotected_uris allows SSO credentials to be passed anyway - ynh_app_setting_set "$app" unprotected_uris "/" - - # ynh panel is not needed - ynh_replace_string " include conf.d/" " #include conf.d/" "$finalnginxconf" - - ynh_store_file_checksum "$finalnginxconf" -fi +ynh_app_setting_delete "$app" skipped_uris # Reload services service php5-fpm restart