diff --git a/manifest.json b/manifest.json index b17e919..e52c0da 100644 --- a/manifest.json +++ b/manifest.json @@ -57,10 +57,6 @@ "en": "Set the superuser password", "fr": "Définissez le mot de passe du superutilisateur" }, - "help": { - "en": "Use the help field to add an information for the admin about this question.", - "fr": "Utilisez le champ aide pour ajouter une information à l'intention de l'administrateur à propos de cette question." - }, "example": "Choose a password" } ] diff --git a/scripts/install b/scripts/install index c7fd7c7..b55c13e 100644 --- a/scripts/install +++ b/scripts/install @@ -147,14 +147,14 @@ ynh_use_logrotate --logfile=/var/log/$app.log # INTEGRATE SERVICE IN YUNOHOST #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="TV streaming server and recorder" --log "/var/log/$app.log" +yunohost service add $app --description="TV streaming server and recorder" --log "/var/log/$app.log" --needs_exposed_ports $port $stream_port #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 -ynh_app_setting_set --app=$app --key=skipped_uris --value="/" +ynh_permission_update --permission="main" --add="visitors" #================================================= # RELOAD NGINX diff --git a/scripts/restore b/scripts/restore index 0345710..91bf827 100644 --- a/scripts/restore +++ b/scripts/restore @@ -35,8 +35,6 @@ stream_port=$(ynh_app_setting_get --app=$app --key=stream_port) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=16 -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " @@ -130,14 +128,14 @@ ynh_restore_file --origin_path="/var/log/$app.log" # INTEGRATE SERVICE IN YUNOHOST #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="TV streaming server and recorder" --log "/var/log/$app.log" +yunohost service add $app --description="TV streaming server and recorder" --log "/var/log/$app.log" --needs_exposed_ports $port $stream_port #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 -ynh_app_setting_set --app=$app --key=skipped_uris --value="/" +ynh_permission_update --permission="main" --add="visitors" #================================================= # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index c4ff0ad..84c0ee7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -128,11 +128,25 @@ ynh_add_nginx_config #================================================= -# SETUP SSOWAT +# ENSURE DOWNWARD COMPATIBILITY #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all -ynh_app_setting_set --app=$app --key=skipped_uris --value="/" + ynh_app_setting_delete --app=$app --key=is_public +fi + +if ! ynh_permission_exists --permission="main"; then + # Create the required permissions + ynh_permission_create --permission="main" --allowed="visitors" +fi + +#================================================= +# INTEGRATE SERVICE IN YUNOHOST +#================================================= +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 +yunohost service add $app --description="TV streaming server and recorder" --log "/var/log/$app.log" --needs_exposed_ports $port $stream_port #================================================= # RELOAD NGINX