From b1f502f4bb6c0dd381317791bb349e393c750d7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 10 Jun 2023 11:39:13 +0200 Subject: [PATCH 01/16] v2 --- conf/isso.cfg | 2 +- conf/systemd.service | 4 +- manifest.toml | 62 +++++++++++++++++++++++++ scripts/_common.sh | 2 +- scripts/backup | 18 ++++---- scripts/change_url | 66 ++++++++++++++------------- scripts/install | 106 +++++++++++++++++++++---------------------- scripts/remove | 26 +++++------ scripts/restore | 48 ++++++++++---------- scripts/upgrade | 60 ++++++++++++------------ 10 files changed, 229 insertions(+), 165 deletions(-) create mode 100644 manifest.toml diff --git a/conf/isso.cfg b/conf/isso.cfg index 2d33317..0660821 100644 --- a/conf/isso.cfg +++ b/conf/isso.cfg @@ -4,7 +4,7 @@ approve-if-email-previously-approved = true purge-after = 69d [general] -dbpath = __DATADIR__/comments.db +dbpath = __DATA_DIR__/comments.db host = __TARGETDOMAIN__ notify = smtp gravatar = true diff --git a/conf/systemd.service b/conf/systemd.service index 1d6ffd3..b3042fd 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -6,8 +6,8 @@ After=network.target Type=simple User=__APP__ Group=__APP__ -WorkingDirectory=__FINALPATH__/ -ExecStart=__FINALPATH__/venv/bin/isso -c __FINALPATH__/isso.cfg run +WorkingDirectory=__INSTALL_DIR__/ +ExecStart=__INSTALL_DIR__/venv/bin/isso -c __INSTALL_DIR__/isso.cfg run StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=inherit diff --git a/manifest.toml b/manifest.toml new file mode 100644 index 0000000..44fea26 --- /dev/null +++ b/manifest.toml @@ -0,0 +1,62 @@ +packaging_format = 2 + +id = "isso" +name = "Isso" +description.en = "Lightweight commenting server" +description.fr = "Système de commentaire léger" + +version = "0.13.0~ynh1" + +maintainers = ["Navan Chauhan"] + +[upstream] +license = "MIT" +website = "https://isso-comments.de" +demo = "https://isso-comments.de" +admindoc = "https://isso-comments.de/docs/reference/server-config/" +userdoc = "https://isso-comments.de/docs/reference/client-config/" +code = "https://github.com/posativ/isso" +cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number) +fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin. + +[integration] +yunohost = ">= 11.0.9" +architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"] +multi_instance = true +ldap = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "sso" key : the "ldap" key corresponds to wether or not a user *can* login on the app using its YunoHost credentials. +sso = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "ldap" key : the "sso" key corresponds to wether or not a user is *automatically logged-in* on the app when logged-in on the YunoHost portal. +disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... +ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... + +[install] + [install.domain] + # this is a generic question - ask strings are automatically handled by Yunohost's core + type = "domain" + full_domain = true + + [install.target_domain] + ask.en = "your website or blog (not the location of Isso!)" + type = "string" + example = "https://someotherwebsite.com/" + + [install.admin] + # this is a generic question - ask strings are automatically handled by Yunohost's core + help.en = "User who will receive moderation emails" + type = "user" + + [install.password] + # this is a generic question - ask strings are automatically handled by Yunohost's core + help.en = "Password for the admin interface" + help.fr = "Utilisez le champ aide pour ajouter une information à l'intention de l'administrateur à propos de cette question." + type = "password" + +[resources] + [resources.system_user] + + [resources.install_dir] + + [resources.data_dir] + + [resources.permissions] + main.url = "/" diff --git a/scripts/_common.sh b/scripts/_common.sh index 3357689..795de1d 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app (must be on a single line) -pkg_dependencies="git curl python3 python3-pip python3-venv libpq-dev libsasl2-dev python3-dev libssl-dev libffi-dev python3-cffi" +#REMOVEME? pkg_dependencies="git curl python3 python3-pip python3-venv libpq-dev libsasl2-dev python3-dev libssl-dev libffi-dev python3-cffi" #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index 4ba0b55..e785496 100755 --- a/scripts/backup +++ b/scripts/backup @@ -14,23 +14,23 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { +#REMOVEME? ynh_clean_setup () { ### Remove this function if there's nothing to clean before calling the remove script. true } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_print_info --message="Loading installation settings..." +#REMOVEME? ynh_print_info --message="Loading installation settings..." -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -domain=$(ynh_app_setting_get --app=$app --key=domain) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP @@ -41,13 +41,13 @@ ynh_print_info --message="Declaring files to be backed up..." # BACKUP THE APP MAIN DIR #================================================= -ynh_backup --src_path="$final_path" +ynh_backup --src_path="$install_dir" #================================================= # BACKUP THE DATA DIR #================================================= -ynh_backup --src_path="$datadir" --is_big +ynh_backup --src_path="$data_dir" --is_big #================================================= # BACKUP THE NGINX CONFIGURATION diff --git a/scripts/change_url b/scripts/change_url index 322641b..0aa0d10 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -13,58 +13,58 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS #================================================= -old_domain=$YNH_APP_OLD_DOMAIN -old_path=$YNH_APP_OLD_PATH +#REMOVEME? old_domain=$YNH_APP_OLD_DOMAIN +#REMOVEME? old_path=$YNH_APP_OLD_PATH -new_domain=$YNH_APP_NEW_DOMAIN -new_path=$YNH_APP_NEW_PATH +#REMOVEME? new_domain=$YNH_APP_NEW_DOMAIN +#REMOVEME? new_path=$YNH_APP_NEW_PATH -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 -# Needed for helper "ynh_add_nginx_config" -final_path=$(ynh_app_setting_get --app=$app --key=final_path) +#REMOVEME? # Needed for helper "ynh_add_nginx_config" +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) # Add settings here as needed by your application -#db_name=$(ynh_app_setting_get --app=$app --key=db_name) +#REMOVEME? #db_name=$(ynh_app_setting_get --app=$app --key=db_name) #db_user=$db_name -#db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd) +#REMOVEME? #db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd) #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 +#REMOVEME? ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 # Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { +#REMOVEME? ynh_backup_before_upgrade +#REMOVEME? ynh_clean_setup () { # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. - ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" +#REMOVEME? ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" # Restore it if the upgrade fails - ynh_restore_upgradebackup +#REMOVEME? ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # CHECK WHICH PARTS SHOULD BE CHANGED #================================================= -change_domain=0 -if [ "$old_domain" != "$new_domain" ] +#REMOVEME? change_domain=0 +#REMOVEME? if [ "$old_domain" != "$new_domain" ] then - change_domain=1 + #REMOVEME? change_domain=1 fi -change_path=0 -if [ "$old_path" != "$new_path" ] +#REMOVEME? change_path=0 +#REMOVEME? if [ "$old_path" != "$new_path" ] then - change_path=1 + #REMOVEME? change_path=1 fi #================================================= @@ -81,28 +81,30 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app #================================================= ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 -nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf +ynh_change_url_nginx_config + +#REMOVEME? nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf # Change the path in the NGINX config file if [ $change_path -eq 1 ] then # Make a backup of the original NGINX config file if modified - ynh_backup_if_checksum_is_different --file="$nginx_conf_path" +#REMOVEME? ynh_backup_if_checksum_is_different --file="$nginx_conf_path" # Set global variables for NGINX helper - domain="$old_domain" - path_url="$new_path" +#REMOVEME? domain="$old_domain" +#REMOVEME? path="$new_path" # Create a dedicated NGINX config - ynh_add_nginx_config +#REMOVEME? ynh_add_nginx_config fi # Change the domain for NGINX if [ $change_domain -eq 1 ] then # Delete file checksum for the old conf file location - ynh_delete_file_checksum --file="$nginx_conf_path" - mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf +#REMOVEME? ynh_delete_file_checksum --file="$nginx_conf_path" +#REMOVEME? mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf # Store file checksum for the new config file location - ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" +#REMOVEME? ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" fi #================================================= @@ -123,9 +125,9 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 +#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --weight=1 -ynh_systemd_action --service_name=nginx --action=reload +#REMOVEME? #REMOVEME? ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index 15eac79..269f20d 100755 --- a/scripts/install +++ b/scripts/install @@ -13,88 +13,88 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { +#REMOVEME? ynh_clean_setup () { true } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -domain=$YNH_APP_ARG_DOMAIN -path_url=/ -password=$YNH_APP_ARG_PASSWORD +#REMOVEME? domain=$YNH_APP_ARG_DOMAIN +path=/ +#REMOVEME? password=$YNH_APP_ARG_PASSWORD is_public=1 -admin=$YNH_APP_ARG_ADMIN -targetdomain=$YNH_APP_ARG_TARGET_DOMAIN +#REMOVEME? admin=$YNH_APP_ARG_ADMIN +#REMOVEME? targetdomain=$YNH_APP_ARG_TARGET_DOMAIN -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME adminmail=$(ynh_user_get_info --username=$admin --key=mail) #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -ynh_script_progression --message="Validating installation parameters..." --weight=1 +#REMOVEME? ynh_script_progression --message="Validating installation parameters..." --weight=1 -final_path=/var/www/$app -test ! -e "$final_path" || ynh_die --message="This path already contains a folder" +#REMOVEME? install_dir=/var/www/$app +#REMOVEME? test ! -e "$install_dir" || ynh_die --message="This path already contains a folder" # Register (book) web path -ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url +#REMOVEME? ynh_webpath_register --app=$app --domain=$domain --path=$path #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." --weight=1 +#REMOVEME? 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 -ynh_app_setting_set --app=$app --key=targetdomain --value=$targetdomain -ynh_app_setting_set --app=$app --key=password --value=$password -ynh_app_setting_set --app=$app --key=admin --value=$admin -ynh_app_setting_set --app=$app --key=adminmail --value=$adminmail +#REMOVEME? ynh_app_setting_set --app=$app --key=domain --value=$domain +#REMOVEME? ynh_app_setting_set --app=$app --key=path --value=$path +#REMOVEME? ynh_app_setting_set --app=$app --key=targetdomain --value=$targetdomain +#REMOVEME? ynh_app_setting_set --app=$app --key=password --value=$password +#REMOVEME? ynh_app_setting_set --app=$app --key=admin --value=$admin +#REMOVEME? ynh_app_setting_set --app=$app --key=adminmail --value=$adminmail #================================================= # STANDARD MODIFICATIONS #================================================= # FIND AND OPEN A PORT #================================================= -ynh_script_progression --message="Finding an available port..." --weight=1 +#REMOVEME? ynh_script_progression --message="Finding an available port..." --weight=1 # Find an available port -port=$(ynh_find_port --port=8095) -ynh_app_setting_set --app=$app --key=port --value=$port +#REMOVEME? port=$(ynh_find_port --port=8095) +#REMOVEME? ynh_app_setting_set --app=$app --key=port --value=$port #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies..." --weight=1 +#REMOVEME? ynh_script_progression --message="Installing dependencies..." --weight=1 -ynh_install_app_dependencies $pkg_dependencies +#REMOVEME? ynh_install_app_dependencies $pkg_dependencies #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Configuring system user..." --weight=3 +#REMOVEME? ynh_script_progression --message="Configuring system user..." --weight=3 # Create a system user -ynh_system_user_create --username=$app --home_dir="$final_path" +#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" #================================================= # Setup Final Path #================================================= ynh_script_progression --message="Setting up source files..." --weight=1 -mkdir -p $final_path +mkdir -p $install_dir -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" -ynh_app_setting_set --app=$app --key=final_path --value=$final_path +#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir #================================================= # NGINX CONFIGURATION @@ -108,12 +108,12 @@ ynh_add_nginx_config # SPECIFIC SETUP #================================================= -pushd $final_path - ynh_exec_as $app python3 -m venv $final_path/venv - ynh_exec_as $app "$final_path/venv/bin/pip" install --upgrade pip - ynh_exec_as $app "$final_path/venv/bin/pip" install --upgrade setuptools - ynh_exec_as $app "$final_path/venv/bin/pip" install --upgrade MarkupSafe - ynh_exec_as $app "$final_path/venv/bin/pip" install isso gunicorn +pushd $install_dir + ynh_exec_as $app python3 -m venv $install_dir/venv + ynh_exec_as $app "$install_dir/venv/bin/pip" install --upgrade pip + ynh_exec_as $app "$install_dir/venv/bin/pip" install --upgrade setuptools + ynh_exec_as $app "$install_dir/venv/bin/pip" install --upgrade MarkupSafe + ynh_exec_as $app "$install_dir/venv/bin/pip" install isso gunicorn popd #================================================= @@ -121,24 +121,24 @@ popd #================================================= ynh_script_progression --message="Creating a data directory..." --weight=2 -datadir=/home/yunohost.app/$app -ynh_app_setting_set --app=$app --key=datadir --value=$datadir +#REMOVEME? data_dir=/home/yunohost.app/$app +#REMOVEME? ynh_app_setting_set --app=$app --key=data_dir --value=$data_dir -mkdir -p $datadir +mkdir -p $data_dir -chmod 750 "$datadir" -chmod -R o-rwx "$datadir" -chown -R $app:www-data "$datadir" +chmod 750 "$data_dir" +chmod -R o-rwx "$data_dir" +chown -R $app:www-data "$data_dir" #================================================= # ADD A CONFIGURATION #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="isso.cfg" --destination="$final_path/isso.cfg" +ynh_add_config --template="isso.cfg" --destination="$install_dir/isso.cfg" -chmod 400 "$final_path/isso.cfg" -chown $app:$app "$final_path/isso.cfg" +chmod 400 "$install_dir/isso.cfg" +chown $app:$app "$install_dir/isso.cfg" #================================================= # SETUP SYSTEMD @@ -176,28 +176,28 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring permissions..." --weight=1 +#REMOVEME? ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary -if [ $is_public -eq 1 ] +#REMOVEME? 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" +#REMOVEME? ynh_permission_update --permission="main" --add="visitors" fi # Only the admin can access the admin panel of the app (if the app has an admin panel) -ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin +#REMOVEME? ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin # Possible js bundle and api permission -# ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true" +#REMOVEME? # ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true" #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 +#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --weight=1 -ynh_systemd_action --service_name=nginx --action=reload +#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT diff --git a/scripts/remove b/scripts/remove index cbe2841..c632640 100755 --- a/scripts/remove +++ b/scripts/remove @@ -12,14 +12,14 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -port=$(ynh_app_setting_get --app=$app --key=port) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir) #================================================= # STANDARD REMOVE @@ -53,10 +53,10 @@ ynh_remove_logrotate #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." --weight=1 +#REMOVEME? ynh_script_progression --message="Removing app main directory..." --weight=1 # Remove the app directory securely -ynh_secure_remove --file="$final_path" +#REMOVEME? ynh_secure_remove --file="$install_dir" #================================================= # REMOVE DATA DIR @@ -66,7 +66,7 @@ ynh_secure_remove --file="$final_path" if [ "${YNH_APP_PURGE:-0}" -eq 1 ] then ynh_script_progression --message="Removing app data directory..." --weight=1 - ynh_secure_remove --file="$datadir" +#REMOVEME? ynh_secure_remove --file="$data_dir" fi #================================================= @@ -80,10 +80,10 @@ ynh_remove_nginx_config #================================================= # REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 +#REMOVEME? ynh_script_progression --message="Removing dependencies..." --weight=1 # Remove metapackage and its dependencies -ynh_remove_app_dependencies +#REMOVEME? ynh_remove_app_dependencies #================================================= # CLOSE A PORT @@ -110,10 +110,10 @@ ynh_secure_remove --file="/var/log/$app" #================================================= # REMOVE DEDICATED USER #================================================= -ynh_script_progression --message="Removing the dedicated system user..." --weight=1 +#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..." --weight=1 # Delete a system user -ynh_system_user_delete --username=$app +#REMOVEME? ynh_system_user_delete --username=$app #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 99c80ba..96bb0e9 100755 --- a/scripts/restore +++ b/scripts/restore @@ -14,76 +14,76 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { +#REMOVEME? ynh_clean_setup () { #### Remove this function if there's nothing to clean before calling the remove script. true } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_script_progression --message="Validating restoration parameters..." --weight=1 +#REMOVEME? ynh_script_progression --message="Validating restoration parameters..." --weight=1 -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +#REMOVEME? test ! -d $install_dir \ + || ynh_die --message="There is already a directory: $install_dir " #================================================= # STANDARD RESTORATION STEPS #================================================= # RECREATE THE DEDICATED USER #================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 +#REMOVEME? ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" +#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" #================================================= # RESTORE THE APP MAIN DIR #================================================= ynh_script_progression --message="Restoring the app main directory..." --weight=1 -ynh_restore_file --origin_path="$final_path" +ynh_restore_file --origin_path="$install_dir" -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # RESTORE THE DATA DIRECTORY #================================================= ynh_script_progression --message="Restoring the data directory..." --weight=1 -ynh_restore_file --origin_path="$datadir" --not_mandatory +ynh_restore_file --origin_path="$data_dir" --not_mandatory -mkdir -p $datadir +mkdir -p $data_dir -chmod 750 "$datadir" -chmod -R o-rwx "$datadir" -chown -R $app:www-data "$datadir" +chmod 750 "$data_dir" +chmod -R o-rwx "$data_dir" +chown -R $app:www-data "$data_dir" #================================================= # SPECIFIC RESTORATION #================================================= # REINSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=1 +#REMOVEME? ynh_script_progression --message="Reinstalling dependencies..." --weight=1 # Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies +#REMOVEME? ynh_install_app_dependencies $pkg_dependencies #================================================= # RESTORE THE NGINX CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 7c3ec86..14b626d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,19 +12,19 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -admin=$(ynh_app_setting_get --app=$app --key=admin) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) -targetdomain=$(ynh_app_setting_get --app=$app --key=targetdomain) -adminmail=$(ynh_app_setting_get --app=$app --key=adminmail) -port=$(ynh_app_setting_get --app=$app --key=port) -password=$(ynh_app_setting_get --app=$app --key=password) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) +#REMOVEME? admin=$(ynh_app_setting_get --app=$app --key=admin) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir) +#REMOVEME? targetdomain=$(ynh_app_setting_get --app=$app --key=targetdomain) +#REMOVEME? adminmail=$(ynh_app_setting_get --app=$app --key=adminmail) +#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) +#REMOVEME? password=$(ynh_app_setting_get --app=$app --key=password) #================================================= # CHECK VERSION @@ -35,16 +35,16 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 +#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 # Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { +#REMOVEME? ynh_backup_before_upgrade +#REMOVEME? ynh_clean_setup () { # Restore it if the upgrade fails - ynh_restore_upgradebackup +#REMOVEME? ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # STANDARD UPGRADE STEPS @@ -63,10 +63,10 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 +#REMOVEME? ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" +#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -76,21 +76,21 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=1 - pushd $final_path - ynh_exec_as $app "$final_path/venv/bin/pip" install --upgrade isso gunicorn + pushd $install_dir + ynh_exec_as $app "$install_dir/venv/bin/pip" install --upgrade isso gunicorn popd fi -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=1 +#REMOVEME? ynh_script_progression --message="Upgrading dependencies..." --weight=1 -ynh_install_app_dependencies $pkg_dependencies +#REMOVEME? ynh_install_app_dependencies $pkg_dependencies #================================================= # NGINX CONFIGURATION @@ -105,10 +105,10 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Updating a configuration file..." --weight=1 -ynh_add_config --template="isso.cfg" --destination="$final_path/isso.cfg" +ynh_add_config --template="isso.cfg" --destination="$install_dir/isso.cfg" -chmod 400 "$final_path/isso.cfg" -chown $app:$app "$final_path/isso.cfg" +chmod 400 "$install_dir/isso.cfg" +chown $app:$app "$install_dir/isso.cfg" #================================================= # SETUP SYSTEMD @@ -145,9 +145,9 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 +#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --weight=1 -ynh_systemd_action --service_name=nginx --action=reload +#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT From 76f094e65de5c38411e2d9eb9fc0ea5499937088 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 10 Jun 2023 09:39:18 +0000 Subject: [PATCH 02/16] Auto-update README --- README.md | 3 ++- README_fr.md | 21 +++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index a339562..5eede8a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ It shall NOT be edited by hand. # Isso for YunoHost -[![Integration level](https://dash.yunohost.org/integration/isso.svg)](https://dash.yunohost.org/appci/app/isso) ![Working status](https://ci-apps.yunohost.org/ci/badges/isso.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/isso.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/isso.svg)](https://dash.yunohost.org/appci/app/isso) ![Working status](https://ci-apps.yunohost.org/ci/badges/isso.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/isso.maintain.svg) + [![Install Isso with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=isso) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 06bb5b9..ae595b4 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,15 +5,16 @@ It shall NOT be edited by hand. # Isso pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/isso.svg)](https://dash.yunohost.org/appci/app/isso) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/isso.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/isso.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/isso.svg)](https://dash.yunohost.org/appci/app/isso) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/isso.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/isso.maintain.svg) + [![Installer Isso avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=isso) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Isso rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* +> *Ce package vous permet d’installer Isso rapidement et simplement sur un serveur YunoHost. +Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.* -## Vue d'ensemble +## Vue d’ensemble Isso – *Ich schrei sonst* – is a lightweight commenting server written in Python and JavaScript. It aims to be a drop-in replacement for @@ -35,9 +36,9 @@ Python and JavaScript. It aims to be a drop-in replacement for **Démo :** https://isso-comments.de -## Captures d'écran +## Captures d’écran -![Capture d'écran de Isso](./doc/screenshots/example.jpg) +![Capture d’écran de Isso](./doc/screenshots/example.jpg) ## Avertissements / informations importantes @@ -51,10 +52,10 @@ Python and JavaScript. It aims to be a drop-in replacement for ## Documentations et ressources -* Site officiel de l'app : +* Site officiel de l’app : * Documentation officielle utilisateur : -* Documentation officielle de l'admin : -* Dépôt de code officiel de l'app : +* Documentation officielle de l’admin : +* Dépôt de code officiel de l’app : * Documentation YunoHost pour cette app : * Signaler un bug : @@ -70,4 +71,4 @@ ou sudo yunohost app upgrade isso -u https://github.com/YunoHost-Apps/isso_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file From ba8674d4e5302ead9452d95f349afc9c1974a3fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 10 Jun 2023 11:50:32 +0200 Subject: [PATCH 03/16] v2 --- .github/workflows/updater.sh | 137 ----------------------------------- check_process | 29 -------- conf/nginx.conf | 1 + conf/systemd.service | 2 +- doc/DESCRIPTION.md | 16 ++-- doc/DISCLAIMER.md | 4 +- manifest.json | 61 ---------------- manifest.toml | 39 ++++++---- scripts/_common.sh | 3 - scripts/backup | 22 ------ scripts/change_url | 95 ------------------------ scripts/install | 123 ------------------------------- scripts/remove | 81 --------------------- scripts/restore | 73 ------------------- scripts/upgrade | 54 -------------- tests.toml | 7 ++ 16 files changed, 40 insertions(+), 707 deletions(-) delete mode 100755 .github/workflows/updater.sh delete mode 100644 check_process delete mode 100644 manifest.json create mode 100644 tests.toml diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh deleted file mode 100755 index 72eb5cb..0000000 --- a/.github/workflows/updater.sh +++ /dev/null @@ -1,137 +0,0 @@ -#!/bin/bash - -#================================================= -# PACKAGE UPDATING HELPER -#================================================= - -# This script is meant to be run by GitHub Actions -# The YunoHost-Apps organisation offers a template Action to run this script periodically -# Since each app is different, maintainers can adapt its contents so as to perform -# automatic actions when a new upstream release is detected. - -# Remove this exit command when you are ready to run this Action -exit 1 - -#================================================= -# FETCHING LATEST RELEASE AND ITS ASSETS -#================================================= - -# Fetching information -current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') -repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]') -# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) -version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1) -assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'")) - -# Later down the script, we assume the version has only digits and dots -# Sometimes the release name starts with a "v", so let's filter it out. -# You may need more tweaks here if the upstream repository has different naming conventions. -if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then - version=${version:1} -fi - -# Setting up the environment variables -echo "Current version: $current_version" -echo "Latest release from upstream: $version" -echo "VERSION=$version" >> $GITHUB_ENV -echo "REPO=$repo" >> $GITHUB_ENV -# For the time being, let's assume the script will fail -echo "PROCEED=false" >> $GITHUB_ENV - -# Proceed only if the retrieved version is greater than the current one -if ! dpkg --compare-versions "$current_version" "lt" "$version" ; then - echo "::warning ::No new version available" - exit 0 -# Proceed only if a PR for this new version does not already exist -elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY.git ci-auto-update-v$version ; then - echo "::warning ::A branch already exists for this update" - exit 0 -fi - -# Each release can hold multiple assets (e.g. binaries for different architectures, source code, etc.) -echo "${#assets[@]} available asset(s)" - -#================================================= -# UPDATE SOURCE FILES -#================================================= - -# Here we use the $assets variable to get the resources published in the upstream release. -# Here is an example for Grav, it has to be adapted in accordance with how the upstream releases look like. - -# Let's loop over the array of assets URLs -for asset_url in ${assets[@]}; do - -echo "Handling asset at $asset_url" - -# Assign the asset to a source file in conf/ directory -# Here we base the source file name upon a unique keyword in the assets url (admin vs. update) -# Leave $src empty to ignore the asset -case $asset_url in - *"admin"*) - src="app" - ;; - *"update"*) - src="app-upgrade" - ;; - *) - src="" - ;; -esac - -# If $src is not empty, let's process the asset -if [ ! -z "$src" ]; then - -# Create the temporary directory -tempdir="$(mktemp -d)" - -# Download sources and calculate checksum -filename=${asset_url##*/} -curl --silent -4 -L $asset_url -o "$tempdir/$filename" -checksum=$(sha256sum "$tempdir/$filename" | head -c 64) - -# Delete temporary directory -rm -rf $tempdir - -# Get extension -if [[ $filename == *.tar.gz ]]; then - extension=tar.gz -else - extension=${filename##*.} -fi - -# Rewrite source file -cat < conf/$src.src -SOURCE_URL=$asset_url -SOURCE_SUM=$checksum -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=$extension -SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= -EOT -echo "... conf/$src.src updated" - -else -echo "... asset ignored" -fi - -done - -#================================================= -# SPECIFIC UPDATE STEPS -#================================================= - -# Any action on the app's source code can be done. -# The GitHub Action workflow takes care of committing all changes after this script ends. - -#================================================= -# GENERIC FINALIZATION -#================================================= - -# Replace new version in manifest -echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json - -# No need to update the README, yunohost-bot takes care of it - -# The Action will proceed only if the PROCEED environment variable is set to true -echo "PROCEED=true" >> $GITHUB_ENV -exit 0 diff --git a/check_process b/check_process deleted file mode 100644 index ee0652e..0000000 --- a/check_process +++ /dev/null @@ -1,29 +0,0 @@ -;; Test complet - ; Manifest - domain="domain.tld" - path="/admin" (PATH) - is_public=1 - admin="john" - password="1Strong-Password" - port="666" - target_domain="https://google.com" - ; Checks - pkg_linter=1 - setup_sub_dir=0 - setup_root=1 - setup_nourl=0 - setup_private=0 - setup_public=1 - upgrade=1 - upgrade=1 from_commit=CommitHash - backup_restore=1 - multi_instance=1 - port_already_use=0 - change_url=0 -;;; Options -Email= -Notification=none -;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. - manifest_arg=domain=DOMAIN&path=PATH&is_public=1&admin=USER&password=pass&port=666&target_domain=target_domain diff --git a/conf/nginx.conf b/conf/nginx.conf index d5cea5a..d7eb2ea 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,5 +1,6 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { + proxy_pass http://127.0.0.1:__PORT__; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; diff --git a/conf/systemd.service b/conf/systemd.service index b3042fd..f52ac8e 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=isso commenting system +Description=Isso: commenting system After=network.target [Service] diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 708fcff..9d1ccec 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1,15 +1,9 @@ -Isso – *Ich schrei sonst* – is a lightweight commenting server written in -Python and JavaScript. It aims to be a drop-in replacement for +Isso – *Ich schrei sonst* – is a lightweight commenting server written in Python and JavaScript. It aims to be a drop-in replacement for [Disqus](http://disqus.com). ### Features -- **Comments written in Markdown** - Users can edit or delete own comments (within 15 minutes by default). - Comments in moderation queue are not publicly visible before activation. -- **SQLite backend** - *Because comments are not Big Data.* -- **Disqus & WordPress Import** - You can migrate your Disqus/WordPress comments without any hassle. -- **Configurable JS client** - Embed a single JS file, 65kB (20kB gzipped) and you are done. \ No newline at end of file +- Comments written in Markdown +- SQLite backend +- Disqus & WordPress Import +- Configurable JS client \ No newline at end of file diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 2077c8a..aeaf3e9 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,7 +1,5 @@ -* Limitations - * Requires a dedicated domain * Extra information - * The admin interface for the app is `https://yourdomain.tld/admin` + * The admin interface for the app is `https://__DOMAIN__/admin` * One app instance can only be installed for one domain * Please do not add a trailing `/` in the target_domain diff --git a/manifest.json b/manifest.json deleted file mode 100644 index 43c72ec..0000000 --- a/manifest.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "Isso", - "id": "isso", - "packaging_format": 1, - "description": { - "en": "Lightweight commenting server", - "fr": "Système de commentaire léger" - }, - "version": "0.13.0~ynh1", - "url": "https://isso-comments.de", - "upstream": { - "license": "MIT", - "website": "https://isso-comments.de", - "demo": "https://isso-comments.de", - "admindoc": "https://isso-comments.de/docs/reference/server-config/", - "userdoc": "https://isso-comments.de/docs/reference/client-config/", - "code": "https://github.com/posativ/isso" - }, - "license": "MIT", - "maintainer": { - "name": "Navan Chauhan", - "email": "isso@navan.email" - }, - "requirements": { - "yunohost": ">= 11.0.9" - }, - "multi_instance": true, - "services": [ - "nginx" - ], - "arguments": { - "install": [ - { - "name": "domain", - "type": "domain" - }, - { - "name": "target_domain", - "type": "string", - "ask": { - "en": "your website or blog (not the location of Isso!)" - }, - "example": "https://someotherwebsite.com/" - }, { - "name": "admin", - "type": "user", - "help": { - "en": "User who will receive moderation emails" - } - }, - { - "name": "password", - "type": "password", - "help": { - "en": "Password for the admin interface", - "fr": "Utilisez le champ aide pour ajouter une information à l'intention de l'administrateur à propos de cette question." - } - } - ] - } -} diff --git a/manifest.toml b/manifest.toml index 44fea26..2c611ab 100644 --- a/manifest.toml +++ b/manifest.toml @@ -20,38 +20,40 @@ cpe = "???" # FIXME: optional but recommended if relevant, this is meant to cont fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin. [integration] -yunohost = ">= 11.0.9" -architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"] +yunohost = ">= 11.1.20" +architectures = "all" multi_instance = true -ldap = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "sso" key : the "ldap" key corresponds to wether or not a user *can* login on the app using its YunoHost credentials. -sso = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "ldap" key : the "sso" key corresponds to wether or not a user is *automatically logged-in* on the app when logged-in on the YunoHost portal. -disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... -ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... -ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +ldap = false +sso = false +disk = "50M" +ram.build = "50M" +ram.runtime = "50M" [install] [install.domain] - # this is a generic question - ask strings are automatically handled by Yunohost's core type = "domain" full_domain = true [install.target_domain] - ask.en = "your website or blog (not the location of Isso!)" + ask.en = "your website or blog (not the location of Isso!). Please do not add a trailing `/` in the target_domain" + ask.fr = "votre site Web ou votre blog (pas l'emplacement d'Isso !). Veuillez ne pas ajouter de `/` à la fin du domaine_cible" type = "string" - example = "https://someotherwebsite.com/" + example = "https://someotherwebsite.com" [install.admin] - # this is a generic question - ask strings are automatically handled by Yunohost's core help.en = "User who will receive moderation emails" + help.fr = "Utilisateur qui recevra les emails de modération" type = "user" [install.password] - # this is a generic question - ask strings are automatically handled by Yunohost's core - help.en = "Password for the admin interface" - help.fr = "Utilisez le champ aide pour ajouter une information à l'intention de l'administrateur à propos de cette question." + help.en = "Password for the admin interface." + help.fr = "Mot de passe pour l'interface d'administration." type = "password" [resources] + + [resources.ports] + [resources.system_user] [resources.install_dir] @@ -60,3 +62,12 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen [resources.permissions] main.url = "/" + admin.url = "/admin" + admin.allowed = "admins" + api.url="/api" + api.allowed="visitors" + api.show_tile="false" + api.protected="true" + + [resources.apt] + packages = "git curl python3 python3-pip python3-venv libpq-dev libsasl2-dev python3-dev libssl-dev libffi-dev python3-cffi" diff --git a/scripts/_common.sh b/scripts/_common.sh index 795de1d..944a65e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,9 +4,6 @@ # COMMON VARIABLES #================================================= -# dependencies used by the app (must be on a single line) -#REMOVEME? pkg_dependencies="git curl python3 python3-pip python3-venv libpq-dev libsasl2-dev python3-dev libssl-dev libffi-dev python3-cffi" - #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index e785496..d4006e2 100755 --- a/scripts/backup +++ b/scripts/backup @@ -10,28 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -#REMOVEME? ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. - true -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_print_info --message="Loading installation settings..." - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir) - #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= diff --git a/scripts/change_url b/scripts/change_url index 0aa0d10..ae914ad 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -9,64 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -#REMOVEME? old_domain=$YNH_APP_OLD_DOMAIN -#REMOVEME? old_path=$YNH_APP_OLD_PATH - -#REMOVEME? new_domain=$YNH_APP_NEW_DOMAIN -#REMOVEME? new_path=$YNH_APP_NEW_PATH - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 - -#REMOVEME? # Needed for helper "ynh_add_nginx_config" -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) - -# Add settings here as needed by your application -#REMOVEME? #db_name=$(ynh_app_setting_get --app=$app --key=db_name) -#db_user=$db_name -#REMOVEME? #db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd) - -#================================================= -# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP -#================================================= -#REMOVEME? ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 - -# Backup the current version of the app -#REMOVEME? ynh_backup_before_upgrade -#REMOVEME? ynh_clean_setup () { - # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. -#REMOVEME? ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" - - # Restore it if the upgrade fails -#REMOVEME? ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# CHECK WHICH PARTS SHOULD BE CHANGED -#================================================= - -#REMOVEME? change_domain=0 -#REMOVEME? if [ "$old_domain" != "$new_domain" ] -then - #REMOVEME? change_domain=1 -fi - -#REMOVEME? change_path=0 -#REMOVEME? if [ "$old_path" != "$new_path" ] -then - #REMOVEME? change_path=1 -fi - #================================================= # STANDARD MODIFICATIONS #================================================= @@ -83,36 +25,6 @@ ynh_script_progression --message="Updating NGINX web server configuration..." -- ynh_change_url_nginx_config -#REMOVEME? nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf - -# Change the path in the NGINX config file -if [ $change_path -eq 1 ] -then - # Make a backup of the original NGINX config file if modified -#REMOVEME? ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for NGINX helper -#REMOVEME? domain="$old_domain" -#REMOVEME? path="$new_path" - # Create a dedicated NGINX config -#REMOVEME? ynh_add_nginx_config -fi - -# Change the domain for NGINX -if [ $change_domain -eq 1 ] -then - # Delete file checksum for the old conf file location -#REMOVEME? ynh_delete_file_checksum --file="$nginx_conf_path" -#REMOVEME? mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf - # Store file checksum for the new config file location -#REMOVEME? ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" -fi - -#================================================= -# SPECIFIC MODIFICATIONS -#================================================= -# ... -#================================================= - #================================================= # GENERIC FINALISATION #================================================= @@ -122,13 +34,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" -#================================================= -# RELOAD NGINX -#================================================= -#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -#REMOVEME? #REMOVEME? ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/install b/scripts/install index 269f20d..4a924bb 100755 --- a/scripts/install +++ b/scripts/install @@ -9,80 +9,12 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -#REMOVEME? ynh_clean_setup () { - true -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -#REMOVEME? domain=$YNH_APP_ARG_DOMAIN -path=/ -#REMOVEME? password=$YNH_APP_ARG_PASSWORD -is_public=1 -#REMOVEME? admin=$YNH_APP_ARG_ADMIN -#REMOVEME? targetdomain=$YNH_APP_ARG_TARGET_DOMAIN - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - adminmail=$(ynh_user_get_info --username=$admin --key=mail) -#================================================= -# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS -#================================================= -#REMOVEME? ynh_script_progression --message="Validating installation parameters..." --weight=1 - -#REMOVEME? install_dir=/var/www/$app -#REMOVEME? test ! -e "$install_dir" || ynh_die --message="This path already contains a folder" - -# Register (book) web path -#REMOVEME? ynh_webpath_register --app=$app --domain=$domain --path=$path - -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= -#REMOVEME? ynh_script_progression --message="Storing installation settings..." --weight=1 - -#REMOVEME? ynh_app_setting_set --app=$app --key=domain --value=$domain -#REMOVEME? ynh_app_setting_set --app=$app --key=path --value=$path -#REMOVEME? ynh_app_setting_set --app=$app --key=targetdomain --value=$targetdomain -#REMOVEME? ynh_app_setting_set --app=$app --key=password --value=$password -#REMOVEME? ynh_app_setting_set --app=$app --key=admin --value=$admin -#REMOVEME? ynh_app_setting_set --app=$app --key=adminmail --value=$adminmail - -#================================================= -# STANDARD MODIFICATIONS -#================================================= -# FIND AND OPEN A PORT -#================================================= -#REMOVEME? ynh_script_progression --message="Finding an available port..." --weight=1 - -# Find an available port -#REMOVEME? port=$(ynh_find_port --port=8095) -#REMOVEME? ynh_app_setting_set --app=$app --key=port --value=$port - -#================================================= -# INSTALL DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Installing dependencies..." --weight=1 - -#REMOVEME? ynh_install_app_dependencies $pkg_dependencies - -#================================================= -# CREATE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Configuring system user..." --weight=3 - -# Create a system user -#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" - #================================================= # Setup Final Path #================================================= @@ -90,12 +22,9 @@ ynh_script_progression --message="Setting up source files..." --weight=1 mkdir -p $install_dir -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir - #================================================= # NGINX CONFIGURATION #================================================= @@ -116,20 +45,6 @@ pushd $install_dir ynh_exec_as $app "$install_dir/venv/bin/pip" install isso gunicorn popd -#================================================= -# CREATE DATA DIRECTORY -#================================================= -ynh_script_progression --message="Creating a data directory..." --weight=2 - -#REMOVEME? data_dir=/home/yunohost.app/$app -#REMOVEME? ynh_app_setting_set --app=$app --key=data_dir --value=$data_dir - -mkdir -p $data_dir - -chmod 750 "$data_dir" -chmod -R o-rwx "$data_dir" -chown -R $app:www-data "$data_dir" - #================================================= # ADD A CONFIGURATION #================================================= @@ -148,21 +63,9 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=1 # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# GENERIC FINALIZATION -#================================================= -# SETUP LOGROTATE -#================================================= -ynh_script_progression --message="Configuring log rotation..." --weight=1 - # Use logrotate to manage application logfile(s) ynh_use_logrotate -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add $app --description="Isso - a commenting server" --log="/var/log/$app/$app.log" #================================================= @@ -173,32 +76,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" -#================================================= -# SETUP SSOWAT -#================================================= -#REMOVEME? ynh_script_progression --message="Configuring permissions..." --weight=1 - -# Make app public if necessary -#REMOVEME? if [ $is_public -eq 1 ] -then - # Everyone can access the app. - # The "main" permission is automatically created before the install script. -#REMOVEME? ynh_permission_update --permission="main" --add="visitors" -fi - -# Only the admin can access the admin panel of the app (if the app has an admin panel) -#REMOVEME? ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin - -# Possible js bundle and api permission -#REMOVEME? # ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true" - -#================================================= -# RELOAD NGINX -#================================================= -#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/remove b/scripts/remove index c632640..c04a74d 100755 --- a/scripts/remove +++ b/scripts/remove @@ -9,18 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir) - #================================================= # STANDARD REMOVE #================================================= @@ -34,87 +22,18 @@ then yunohost service remove $app fi -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 - # Remove the dedicated systemd config ynh_remove_systemd_config -#================================================= -# REMOVE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Removing logrotate configuration..." --weight=1 - # Remove the app-specific logrotate config ynh_remove_logrotate -#================================================= -# REMOVE APP MAIN DIR -#================================================= -#REMOVEME? ynh_script_progression --message="Removing app main directory..." --weight=1 - -# Remove the app directory securely -#REMOVEME? ynh_secure_remove --file="$install_dir" - -#================================================= -# REMOVE DATA DIR -#================================================= - -# Remove the data directory if --purge option is used -if [ "${YNH_APP_PURGE:-0}" -eq 1 ] -then - ynh_script_progression --message="Removing app data directory..." --weight=1 -#REMOVEME? ynh_secure_remove --file="$data_dir" -fi - -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 - # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Removing dependencies..." --weight=1 - -# Remove metapackage and its dependencies -#REMOVEME? ynh_remove_app_dependencies - -#================================================= -# CLOSE A PORT -#================================================= - -if yunohost firewall list | grep -q "\- $port$" -then - ynh_script_progression --message="Closing port $port..." --weight=1 - ynh_exec_warn_less yunohost firewall disallow TCP $port -fi - -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE VARIOUS FILES -#================================================= -ynh_script_progression --message="Removing various files..." --weight=2 - # Remove the log files ynh_secure_remove --file="/var/log/$app" -#================================================= -# GENERIC FINALIZATION -#================================================= -# REMOVE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..." --weight=1 - -# Delete a system user -#REMOVEME? ynh_system_user_delete --username=$app - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 96bb0e9..e0afde0 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,47 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -#REMOVEME? ynh_clean_setup () { - #### Remove this function if there's nothing to clean before calling the remove script. - true -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir) - -#================================================= -# CHECK IF THE APP CAN BE RESTORED -#================================================= -#REMOVEME? ynh_script_progression --message="Validating restoration parameters..." --weight=1 - -#REMOVEME? test ! -d $install_dir \ - || ynh_die --message="There is already a directory: $install_dir " - -#================================================= -# STANDARD RESTORATION STEPS -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 - -# Create the dedicated user (if not existing) -#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" - #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -58,7 +17,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -69,22 +27,8 @@ ynh_script_progression --message="Restoring the data directory..." --weight=1 ynh_restore_file --origin_path="$data_dir" --not_mandatory -mkdir -p $data_dir - -chmod 750 "$data_dir" -chmod -R o-rwx "$data_dir" chown -R $app:www-data "$data_dir" -#================================================= -# SPECIFIC RESTORATION -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Reinstalling dependencies..." --weight=1 - -# Define and install dependencies -#REMOVEME? ynh_install_app_dependencies $pkg_dependencies - #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= @@ -92,19 +36,9 @@ ynh_script_progression --message="Restoring the NGINX web server configuration.. ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE SYSTEMD -#================================================= -ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 - ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1 - mkdir -p "/var/log/$app" chown -R $app: "/var/log/$app" @@ -124,13 +58,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" -#================================================= -# GENERIC FINALIZATION -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 14b626d..39bd97f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,43 +9,12 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) -#REMOVEME? admin=$(ynh_app_setting_get --app=$app --key=admin) -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir) -#REMOVEME? targetdomain=$(ynh_app_setting_get --app=$app --key=targetdomain) -#REMOVEME? adminmail=$(ynh_app_setting_get --app=$app --key=adminmail) -#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) -#REMOVEME? password=$(ynh_app_setting_get --app=$app --key=password) - #================================================= # CHECK VERSION #================================================= upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 - -# Backup the current version of the app -#REMOVEME? ynh_backup_before_upgrade -#REMOVEME? ynh_clean_setup () { - # Restore it if the upgrade fails -#REMOVEME? ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -60,14 +29,6 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -#================================================= -# CREATE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 - -# Create a dedicated user (if not existing) -#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -81,17 +42,9 @@ then popd fi -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Upgrading dependencies..." --weight=1 - -#REMOVEME? ynh_install_app_dependencies $pkg_dependencies - #================================================= # NGINX CONFIGURATION #================================================= @@ -142,13 +95,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" -#================================================= -# RELOAD NGINX -#================================================= -#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/tests.toml b/tests.toml new file mode 100644 index 0000000..f483290 --- /dev/null +++ b/tests.toml @@ -0,0 +1,7 @@ +test_format = 1.0 + +[default] + + + +args.target_domain="https://google.com" \ No newline at end of file From 925576c13ae8a0bd1a892ebed321f640b5d07f6c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 10 Jun 2023 09:50:43 +0000 Subject: [PATCH 04/16] Auto-update README --- README.md | 20 ++++++-------------- README_fr.md | 20 ++++++-------------- 2 files changed, 12 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 5eede8a..c2d5cb7 100644 --- a/README.md +++ b/README.md @@ -16,21 +16,15 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -Isso – *Ich schrei sonst* – is a lightweight commenting server written in -Python and JavaScript. It aims to be a drop-in replacement for +Isso – *Ich schrei sonst* – is a lightweight commenting server written in Python and JavaScript. It aims to be a drop-in replacement for [Disqus](http://disqus.com). ### Features -- **Comments written in Markdown** - Users can edit or delete own comments (within 15 minutes by default). - Comments in moderation queue are not publicly visible before activation. -- **SQLite backend** - *Because comments are not Big Data.* -- **Disqus & WordPress Import** - You can migrate your Disqus/WordPress comments without any hassle. -- **Configurable JS client** - Embed a single JS file, 65kB (20kB gzipped) and you are done. +- Comments written in Markdown +- SQLite backend +- Disqus & WordPress Import +- Configurable JS client **Shipped version:** 0.13.0~ynh1 @@ -42,11 +36,9 @@ Python and JavaScript. It aims to be a drop-in replacement for ## Disclaimers / important information -* Limitations - * Requires a dedicated domain * Extra information - * The admin interface for the app is `https://yourdomain.tld/admin` + * The admin interface for the app is `https://__DOMAIN__/admin` * One app instance can only be installed for one domain * Please do not add a trailing `/` in the target_domain diff --git a/README_fr.md b/README_fr.md index ae595b4..165d18d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -16,21 +16,15 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po ## Vue d’ensemble -Isso – *Ich schrei sonst* – is a lightweight commenting server written in -Python and JavaScript. It aims to be a drop-in replacement for +Isso – *Ich schrei sonst* – is a lightweight commenting server written in Python and JavaScript. It aims to be a drop-in replacement for [Disqus](http://disqus.com). ### Features -- **Comments written in Markdown** - Users can edit or delete own comments (within 15 minutes by default). - Comments in moderation queue are not publicly visible before activation. -- **SQLite backend** - *Because comments are not Big Data.* -- **Disqus & WordPress Import** - You can migrate your Disqus/WordPress comments without any hassle. -- **Configurable JS client** - Embed a single JS file, 65kB (20kB gzipped) and you are done. +- Comments written in Markdown +- SQLite backend +- Disqus & WordPress Import +- Configurable JS client **Version incluse :** 0.13.0~ynh1 @@ -42,11 +36,9 @@ Python and JavaScript. It aims to be a drop-in replacement for ## Avertissements / informations importantes -* Limitations - * Requires a dedicated domain * Extra information - * The admin interface for the app is `https://yourdomain.tld/admin` + * The admin interface for the app is `https://__DOMAIN__/admin` * One app instance can only be installed for one domain * Please do not add a trailing `/` in the target_domain From e140184bc1b56c4203ae4546bbe5c24032829ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 10 Jun 2023 12:03:18 +0200 Subject: [PATCH 05/16] fix --- doc/ADMIN.md | 2 ++ doc/DISCLAIMER.md | 5 ----- manifest.toml | 10 ++++------ 3 files changed, 6 insertions(+), 11 deletions(-) create mode 100644 doc/ADMIN.md delete mode 100644 doc/DISCLAIMER.md diff --git a/doc/ADMIN.md b/doc/ADMIN.md new file mode 100644 index 0000000..cb4ded8 --- /dev/null +++ b/doc/ADMIN.md @@ -0,0 +1,2 @@ +* The admin interface for the app is `https://__DOMAIN__/admin` +* One app instance can only be installed for one domain diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md deleted file mode 100644 index aeaf3e9..0000000 --- a/doc/DISCLAIMER.md +++ /dev/null @@ -1,5 +0,0 @@ - -* Extra information - * The admin interface for the app is `https://__DOMAIN__/admin` - * One app instance can only be installed for one domain - * Please do not add a trailing `/` in the target_domain diff --git a/manifest.toml b/manifest.toml index 2c611ab..03cf85e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -16,8 +16,6 @@ demo = "https://isso-comments.de" admindoc = "https://isso-comments.de/docs/reference/server-config/" userdoc = "https://isso-comments.de/docs/reference/client-config/" code = "https://github.com/posativ/isso" -cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number) -fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin. [integration] yunohost = ">= 11.1.20" @@ -64,10 +62,10 @@ ram.runtime = "50M" main.url = "/" admin.url = "/admin" admin.allowed = "admins" - api.url="/api" - api.allowed="visitors" - api.show_tile="false" - api.protected="true" + api.url = "/api" + api.allowed = "visitors" + api.show_tile = false + api.protected = true [resources.apt] packages = "git curl python3 python3-pip python3-venv libpq-dev libsasl2-dev python3-dev libssl-dev libffi-dev python3-cffi" From 7ccd9619836071cdac2b012bd447ebd66f7715bb Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 10 Jun 2023 10:03:28 +0000 Subject: [PATCH 06/16] Auto-update README --- README.md | 8 -------- README_fr.md | 8 -------- 2 files changed, 16 deletions(-) diff --git a/README.md b/README.md index c2d5cb7..9d4d708 100644 --- a/README.md +++ b/README.md @@ -34,14 +34,6 @@ Isso – *Ich schrei sonst* – is a lightweight commenting server written in Py ![Screenshot of Isso](./doc/screenshots/example.jpg) -## Disclaimers / important information - - -* Extra information - * The admin interface for the app is `https://__DOMAIN__/admin` - * One app instance can only be installed for one domain - * Please do not add a trailing `/` in the target_domain - ## Documentation and resources * Official app website: diff --git a/README_fr.md b/README_fr.md index 165d18d..c826099 100644 --- a/README_fr.md +++ b/README_fr.md @@ -34,14 +34,6 @@ Isso – *Ich schrei sonst* – is a lightweight commenting server written in Py ![Capture d’écran de Isso](./doc/screenshots/example.jpg) -## Avertissements / informations importantes - - -* Extra information - * The admin interface for the app is `https://__DOMAIN__/admin` - * One app instance can only be installed for one domain - * Please do not add a trailing `/` in the target_domain - ## Documentations et ressources * Site officiel de l’app : From 273b0dd73624d735cfab4a8117538b8b8f9a3c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 10 Jun 2023 13:50:22 +0200 Subject: [PATCH 07/16] fix --- conf/isso.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/isso.cfg b/conf/isso.cfg index 0660821..7f0848a 100644 --- a/conf/isso.cfg +++ b/conf/isso.cfg @@ -5,7 +5,7 @@ purge-after = 69d [general] dbpath = __DATA_DIR__/comments.db -host = __TARGETDOMAIN__ +host = __TARGET_DOMAIN__ notify = smtp gravatar = true @@ -21,7 +21,7 @@ from = "Isso Comments" timeout = 10 [server] -listen = http://localhost:__PORT__ +listen = http://127.0.0.1:__PORT__ public-endpoint = [guard] From c06430ab1a7bd0060129803c8b0bee35ecc052ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 10 Jun 2023 14:51:12 +0200 Subject: [PATCH 08/16] fix --- conf/isso.cfg | 2 +- doc/ADMIN_fr.md | 2 ++ doc/DESCRIPTION_fr.md | 8 ++++++++ scripts/change_url | 4 ++-- scripts/install | 6 +++--- scripts/restore | 4 ++-- scripts/upgrade | 6 +++--- 7 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 doc/ADMIN_fr.md create mode 100644 doc/DESCRIPTION_fr.md diff --git a/conf/isso.cfg b/conf/isso.cfg index 7f0848a..8e0f226 100644 --- a/conf/isso.cfg +++ b/conf/isso.cfg @@ -16,7 +16,7 @@ password = host = localhost port = 25 security = none -to = __ADMINMAIL__ +to = __EMAIL__ from = "Isso Comments" timeout = 10 diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md new file mode 100644 index 0000000..cb4ded8 --- /dev/null +++ b/doc/ADMIN_fr.md @@ -0,0 +1,2 @@ +* The admin interface for the app is `https://__DOMAIN__/admin` +* One app instance can only be installed for one domain diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..f6b58c6 --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1,8 @@ +Isso – *Ich schrei sonst* – est un serveur de commentaires léger écrit en Python et JavaScript. Il vise à être un remplacement direct pour [Disqus](http://disqus.com). + +### Caractéristiques + +- Commentaires rédigés en Markdown +- Back-end SQLite +- Importation Disqus & WordPress +- Client JS paramétrable \ No newline at end of file diff --git a/scripts/change_url b/scripts/change_url index ae914ad..3a9b28d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF @@ -32,7 +32,7 @@ ynh_change_url_nginx_config #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index 4a924bb..b3a6c7e 100755 --- a/scripts/install +++ b/scripts/install @@ -13,7 +13,7 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -adminmail=$(ynh_user_get_info --username=$admin --key=mail) +email=$(ynh_user_get_info --username=$admin --key=mail) #================================================= # Setup Final Path @@ -66,7 +66,7 @@ ynh_add_systemd_config # Use logrotate to manage application logfile(s) ynh_use_logrotate -yunohost service add $app --description="Isso - a commenting server" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Lightweight commenting server" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE @@ -74,7 +74,7 @@ yunohost service add $app --description="Isso - a commenting server" --log="/var ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index e0afde0..ed9c14b 100755 --- a/scripts/restore +++ b/scripts/restore @@ -49,14 +49,14 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Isso - a commenting server" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Lightweight commenting server" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 39bd97f..05682fe 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -22,7 +22,7 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # ENSURE DOWNWARD COMPATIBILITY @@ -86,14 +86,14 @@ ynh_use_logrotate --non-append #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Isso - a commenting server" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Lightweight commenting server" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # END OF SCRIPT From fc74cc5ddfef8293d640362c23218c7598e8c1a1 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 10 Jun 2023 12:51:17 +0000 Subject: [PATCH 09/16] Auto-update README --- README_fr.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README_fr.md b/README_fr.md index c826099..9dff7cf 100644 --- a/README_fr.md +++ b/README_fr.md @@ -16,15 +16,14 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po ## Vue d’ensemble -Isso – *Ich schrei sonst* – is a lightweight commenting server written in Python and JavaScript. It aims to be a drop-in replacement for -[Disqus](http://disqus.com). +Isso – *Ich schrei sonst* – est un serveur de commentaires léger écrit en Python et JavaScript. Il vise à être un remplacement direct pour [Disqus](http://disqus.com). -### Features +### Caractéristiques -- Comments written in Markdown -- SQLite backend -- Disqus & WordPress Import -- Configurable JS client +- Commentaires rédigés en Markdown +- Back-end SQLite +- Importation Disqus & WordPress +- Client JS paramétrable **Version incluse :** 0.13.0~ynh1 From 98a7436011755173f0cc9f0447e9d7ceedecf6d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 10 Jun 2023 17:23:46 +0200 Subject: [PATCH 10/16] Update upgrade --- scripts/upgrade | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 05682fe..9e48c67 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,6 +9,8 @@ source _common.sh source /usr/share/yunohost/helpers +email=$(ynh_user_get_info --username=$admin --key=mail) + #================================================= # CHECK VERSION #================================================= From d52c9a812eccf7deb38792c71425dfb789e29df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 10 Jun 2023 17:57:24 +0200 Subject: [PATCH 11/16] Update install --- scripts/install | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/install b/scripts/install index b3a6c7e..7a35154 100755 --- a/scripts/install +++ b/scripts/install @@ -14,6 +14,13 @@ source /usr/share/yunohost/helpers #================================================= email=$(ynh_user_get_info --username=$admin --key=mail) +password=$YNH_APP_ARG_PASSWORD + +#================================================= +# STORE SETTINGS FROM MANIFEST +#================================================= + +ynh_app_setting_set --app=$app --key=password --value=$password #================================================= # Setup Final Path From 757e087b17a332bc040fe4f968147f662a78d41c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Sat, 2 Dec 2023 22:14:43 +0100 Subject: [PATCH 12/16] Update install: password is already available as a variable because it's an install question --- scripts/install | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/scripts/install b/scripts/install index 7a35154..c80c21f 100755 --- a/scripts/install +++ b/scripts/install @@ -9,17 +9,7 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# RETRIEVE ARGUMENTS FROM THE MANIFEST -#================================================= - email=$(ynh_user_get_info --username=$admin --key=mail) -password=$YNH_APP_ARG_PASSWORD - -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= - ynh_app_setting_set --app=$app --key=password --value=$password #================================================= From cc8d27f474f1b4fe26686954bfbc4e61ae90becf Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 2 Dec 2023 21:14:47 +0000 Subject: [PATCH 13/16] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9d4d708..4350c41 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Isso – *Ich schrei sonst* – is a lightweight commenting server written in Py * Official user documentation: * Official admin documentation: * Upstream app code repository: -* YunoHost documentation for this app: +* YunoHost Store: * Report a bug: ## Developer info diff --git a/README_fr.md b/README_fr.md index 9dff7cf..c47fa1d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -39,7 +39,7 @@ Isso – *Ich schrei sonst* – est un serveur de commentaires léger écrit en * Documentation officielle utilisateur : * Documentation officielle de l’admin : * Dépôt de code officiel de l’app : -* Documentation YunoHost pour cette app : +* YunoHost Store: * Signaler un bug : ## Informations pour les développeurs From f4cd9f7d8361958e1d362b17c4f4258e3cdcd519 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 2 Dec 2023 21:38:09 +0000 Subject: [PATCH 14/16] Auto-update README --- README.md | 2 +- README_fr.md | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f480c8f..4350c41 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Isso – *Ich schrei sonst* – is a lightweight commenting server written in Py - Disqus & WordPress Import - Configurable JS client -**Shipped version:** 0.13.0~ynh2 +**Shipped version:** 0.13.0~ynh1 **Demo:** https://isso-comments.de diff --git a/README_fr.md b/README_fr.md index 05ceca7..c47fa1d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,7 @@ Isso – *Ich schrei sonst* – est un serveur de commentaires léger écrit en - Importation Disqus & WordPress - Client JS paramétrable -**Version incluse :** 0.13.0~ynh2 +**Version incluse :** 0.13.0~ynh1 **Démo :** https://isso-comments.de @@ -33,7 +33,6 @@ Isso – *Ich schrei sonst* – est un serveur de commentaires léger écrit en ![Capture d’écran de Isso](./doc/screenshots/example.jpg) - ## Documentations et ressources * Site officiel de l’app : From 8c30508b2fc273d4d0adfbb04f7f8099aefeebbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 2 Dec 2023 22:39:08 +0100 Subject: [PATCH 15/16] Update manifest.toml --- manifest.toml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 03cf85e..c33135c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,11 +18,14 @@ userdoc = "https://isso-comments.de/docs/reference/client-config/" code = "https://github.com/posativ/isso" [integration] -yunohost = ">= 11.1.20" +yunohost = ">= 11.2" architectures = "all" multi_instance = true + ldap = false + sso = false + disk = "50M" ram.build = "50M" ram.runtime = "50M" @@ -30,7 +33,6 @@ ram.runtime = "50M" [install] [install.domain] type = "domain" - full_domain = true [install.target_domain] ask.en = "your website or blog (not the location of Isso!). Please do not add a trailing `/` in the target_domain" @@ -68,4 +70,4 @@ ram.runtime = "50M" api.protected = true [resources.apt] - packages = "git curl python3 python3-pip python3-venv libpq-dev libsasl2-dev python3-dev libssl-dev libffi-dev python3-cffi" + packages = "git, curl, python3, python3-pip, python3-venv, libpq-dev, libsasl2-dev, python3-dev, libssl-dev, libffi-dev, python3-cffi" From 619b2d4770b5b1dfb285ca3ce54a09faae20d3d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 2 Dec 2023 22:40:41 +0100 Subject: [PATCH 16/16] Update manifest.toml --- manifest.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/manifest.toml b/manifest.toml index c33135c..7e8fc65 100644 --- a/manifest.toml +++ b/manifest.toml @@ -34,6 +34,10 @@ ram.runtime = "50M" [install.domain] type = "domain" + [install.init_main_permission] + type = "group" + default = "visitors" + [install.target_domain] ask.en = "your website or blog (not the location of Isso!). Please do not add a trailing `/` in the target_domain" ask.fr = "votre site Web ou votre blog (pas l'emplacement d'Isso !). Veuillez ne pas ajouter de `/` à la fin du domaine_cible"