diff --git a/manifest.json b/manifest.json index 1a6af26..6ce469d 100644 --- a/manifest.json +++ b/manifest.json @@ -33,7 +33,12 @@ "type": "path", "example": "/ttrss", "default": "/ttrss" - } + }, + { + "name": "is_public", + "type": "boolean", + "default": true + }, ] } } diff --git a/scripts/install b/scripts/install index 9a207d2..e37f7dc 100644 --- a/scripts/install +++ b/scripts/install @@ -44,6 +44,13 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # STANDARD MODIFICATIONS #================================================= @@ -91,7 +98,7 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= @@ -146,9 +153,17 @@ ynh_systemd_action --service_name=$app --action="start" #================================================= # SETUP SSOWAT #================================================= -# ynh_script_progression --message="Configuring permissions..." --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 # ynh_app_setting_set --app=$app --key=skipped_uris --value="/public.php,/api,/opml.php?op=publish" +# Make app public if necessary + +if [ $is_public -eq 1 ] +then + # Everyone can access the app. + # The "main" permission is automatically created before the install script. + ynh_permission_update --permission="main" --add="visitors" +fi #================================================= # RELOAD NGINX