diff --git a/check_process b/check_process index ac78f5c..a82cc48 100644 --- a/check_process +++ b/check_process @@ -1,14 +1,13 @@ ;; Test complet ; Manifest domain="domain.tld" - path="/path" + path="/" admin="john" - language="fr" is_public=1 password="1Strong-Password" ; Checks pkg_linter=1 - setup_sub_dir=1 + setup_sub_dir=0 setup_root=1 setup_nourl=0 setup_private=1 @@ -17,7 +16,7 @@ #upgrade=1 from_commit=CommitHash backup_restore=1 multi_instance=1 - change_url=1 + change_url=0 ;;; Options Email= Notification=none diff --git a/manifest.json b/manifest.json index a9a56ce..eec2578 100644 --- a/manifest.json +++ b/manifest.json @@ -3,8 +3,8 @@ "id": "commento", "packaging_format": 1, "description": { - "en": "Explain in *a few (10~15) words* the purpose of the app or what it actually does (it is meant to give a rough idea to users browsing a catalog of 100+ apps)", - "fr": "Expliquez en *quelques* (10~15) mots l'utilité de l'app ou ce qu'elle fait (l'objectif est de donner une idée grossière pour des utilisateurs qui naviguent dans un catalogue de 100+ apps)" + "en": "Fast, privacy-focused commenting platform", + "fr": "Plateforme de commentaires rapide axée sur la confidentialité" }, "version": "1.8.0~ynh1", "url": "https://commento.io/", @@ -17,8 +17,8 @@ }, "license": "MIT", "maintainer": { - "name": "John doe", - "email": "john.doe@example.com" + "name": "", + "email": "" }, "requirements": { "yunohost": ">= 4.3.0" @@ -45,11 +45,7 @@ }, { "name": "password", - "type": "password", - "help": { - "en": "Use the help field to add an information for the admin about this question.", - "fr": "Utilisez le champ aide pour ajouter une information à l'intention de l'administrateur à propos de cette question." - } + "type": "password" } ] } diff --git a/scripts/backup b/scripts/backup index 5f340bc..0b0e9d6 100755 --- a/scripts/backup +++ b/scripts/backup @@ -14,10 +14,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -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 diff --git a/scripts/change_url b/scripts/change_url index b286df6..ff37e4c 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -107,7 +107,7 @@ fi #================================================= 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 #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index a28aa37..69dda17 100755 --- a/scripts/install +++ b/scripts/install @@ -13,10 +13,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -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 @@ -63,6 +59,13 @@ ynh_script_progression --message="Finding an available port..." --weight=1 port=$(ynh_find_port --port=8095) ynh_app_setting_set --app=$app --key=port --value=$port +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=20 + +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies + #================================================= # CREATE DEDICATED USER #================================================= @@ -108,10 +111,10 @@ ynh_add_nginx_config # #================================================= # ynh_script_progression --message="Adding a configuration file..." --weight=1 -# ynh_add_config --template="../conf/.env" --destination="$final_path/some_config_file" +# ynh_add_config --template="../conf/.env" --destination="$final_path/.env" -# chmod 400 "$final_path/some_config_file" -# chown $app:$app "$final_path/some_config_file" +# chmod 400 "$final_path/.env" +# chown $app:$app "$final_path/.env" #================================================= # SETUP SYSTEMD @@ -126,7 +129,7 @@ ynh_add_systemd_config #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Privacy-focused commenting platform" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE @@ -134,7 +137,7 @@ yunohost service add $app --description="A short description of the app" --log=" 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 #================================================= # SETUP SSOWAT @@ -144,8 +147,6 @@ ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary if [ $is_public -eq 1 ] then - # Everyone can access the app. - # The "main" permission is automatically created before the install script. ynh_permission_update --permission="main" --add="visitors" fi diff --git a/scripts/restore b/scripts/restore index 2246f5c..0a98bac 100755 --- a/scripts/restore +++ b/scripts/restore @@ -14,10 +14,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -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 @@ -33,6 +29,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name +db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -77,7 +74,7 @@ chown -R $app:www-data "$final_path" ynh_script_progression --message="Reinstalling dependencies..." --weight=1 # Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies #================================================= # RESTORE THE MYSQL DATABASE @@ -101,14 +98,14 @@ systemctl enable $app.service --quiet #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Privacy-focused commenting platform" --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 #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index b56768d..118589c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -105,15 +105,15 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# UPDATE A CONFIG FILE -#================================================= -ynh_script_progression --message="Updating a configuration file..." --weight=1 +# #================================================= +# # UPDATE A CONFIG FILE +# #================================================= +# ynh_script_progression --message="Updating a configuration file..." --weight=1 -ynh_add_config --template="../conf/.env" --destination="$final_path/some_config_file" +# ynh_add_config --template="../conf/.env" --destination="$final_path/.env" -chmod 400 "$final_path/some_config_file" -chown $app:$app "$final_path/some_config_file" +# chmod 400 "$final_path/.env" +# chown $app:$app "$final_path/.env" #================================================= # SETUP SYSTEMD @@ -128,14 +128,14 @@ ynh_add_systemd_config #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Privacy-focused commenting platform" --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 #================================================= # RELOAD NGINX