diff --git a/check_process b/check_process index 48e476b..db18f0c 100644 --- a/check_process +++ b/check_process @@ -1,6 +1,3 @@ -# See here for more informations -# https://github.com/YunoHost/package_check#syntax-check_process-file - ;; Test complet ; Manifest domain="domain.tld" @@ -9,7 +6,6 @@ is_public=1 password="phrasedepasse" language="fr" - port=9537 (PORT) ; Checks pkg_linter=1 setup_sub_dir=1 @@ -28,4 +24,4 @@ Notification=none ;;; Upgrade options ; commit=80bdea70f80aafef673718911ad492ddc54aab5c name=Testing (#23) - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=phrasedepasse&port=9537& + manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=phrasedepasse& diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md new file mode 100644 index 0000000..85e6091 --- /dev/null +++ b/doc/DISCLAIMER_fr.md @@ -0,0 +1,3 @@ +## Configuration + + * Comment configurer cette application : via le panneau d'administration a cette adresse https://example.com/movim/?admin. Le nom d'utilisateur et le mot de passe sont définis lors de l'installation. diff --git a/doc/screenshots/movim.png b/doc/screenshots/movim.png new file mode 100644 index 0000000..e7fab07 Binary files /dev/null and b/doc/screenshots/movim.png differ diff --git a/manifest.json b/manifest.json index 1e88f64..432a3b8 100644 --- a/manifest.json +++ b/manifest.json @@ -8,6 +8,13 @@ }, "version": "0.19~ynh2", "url": "https://movim.eu", + "upstream": { + "license": "AGPL-3.0-or-later", + "website": "https://movim.eu", + "demo": "https://nl.movim.eu/?login", + "admindoc": "https://github.com/movim/movim/wiki", + "code": "https://github.com/movim/movim" + }, "license": "AGPL-3.0-or-later", "maintainer": { "name": "", diff --git a/scripts/install b/scripts/install index 800974c..bbb33a0 100644 --- a/scripts/install +++ b/scripts/install @@ -68,6 +68,14 @@ ynh_script_progression --message="Installing dependencies..." --weight=1 # Install packages ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." --weight=3 + +# Create a system user +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # CREATE A POSTGRESQL DATABASE #================================================= @@ -91,6 +99,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= @@ -99,14 +111,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=11 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." --weight=3 - -# Create a system user -ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -125,7 +129,8 @@ ynh_script_progression --message="Modifying a config file..." --weight=1 ynh_add_config --template="../conf/db.example.inc.php" --destination="$final_path/config/db.inc.php" -ynh_store_file_checksum --file="$final_path/config/db.inc.php" +chmod 400 "$final_path/config/db.inc.php" +chown $app:$app "$final_path/config/db.inc.php" #================================================= # Install PHP dependencies using composer @@ -156,16 +161,6 @@ pushd $final_path php$phpversion daemon.php config --username=$admin --password=$password --quiet popd -#================================================= -# GENERIC FINALIZATION -#================================================= -# SET PERMISSIONS -#================================================= - -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" - #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= diff --git a/scripts/restore b/scripts/restore index a560845..19a43b7 100644 --- a/scripts/restore +++ b/scripts/restore @@ -53,6 +53,14 @@ test ! -d $final_path \ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# RECREATE THE DEDICATED USER +#================================================= +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" + #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -60,19 +68,6 @@ ynh_script_progression --message="Restoring Movim main directory..." --weight=1 ynh_restore_file --origin_path="$final_path" -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 - -# Create the dedicated user (if not existing) -ynh_system_user_create --username=$app - -#================================================= -# RESTORE USER RIGHTS -#================================================= - -# Restore permissions on app files chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index b7f748c..33de1a1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -79,6 +79,14 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=23 ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log" +#================================================= +# CREATE DEDICATED USER +#================================================= +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" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -91,6 +99,10 @@ then ynh_setup_source --dest_dir="$final_path" fi +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= @@ -106,14 +118,6 @@ ynh_script_progression --message="Upgrading dependencies..." --weight=4 ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --weight=7 - -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -124,14 +128,6 @@ ynh_replace_string --match_string="__TIMEZONE__" --replace_string="$timezone" -- ynh_add_fpm_config --package="$extra_php_dependencies" -#================================================= -# SET PERMISSIONS -#================================================= - -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" - #================================================= # INTEGRATE SERVICE IN YUNOHOST #=================================================