diff --git a/README.md b/README.md index c270c1a..dcfb8de 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Movim for YunoHost -[![Integration level](https://dash.yunohost.org/integration/movim.svg)](https://dash.yunohost.org/appci/app/movim) ![](https://ci-apps.yunohost.org/ci/badges/movim.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/movim.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/movim.svg)](https://dash.yunohost.org/appci/app/movim) ![Working status](https://ci-apps.yunohost.org/ci/badges/movim.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/movim.maintain.svg) [![Install Movim with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=movim) *[Lire ce readme en français.](./README_fr.md)* @@ -17,13 +17,14 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Web-based cross-platform XMPP client -**Shipped version:** 0.19~ynh2 + +**Shipped version:** 0.19~ynh4 **Demo:** https://nl.movim.eu/?login ## Screenshots -![](./doc/screenshots/movim.png) +![Screenshot of Movim](./doc/screenshots/movim.png) ## Disclaimers / important information @@ -33,21 +34,22 @@ Web-based cross-platform XMPP client ## Documentation and resources -* Official app website: https://movim.eu -* Official admin documentation: https://github.com/movim/movim/wiki -* Upstream app code repository: https://github.com/movim/movim -* YunoHost documentation for this app: https://yunohost.org/app_movim -* Report a bug: https://github.com/YunoHost-Apps/movim_ynh/issues +* Official app website: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/movim_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/movim_ynh/tree/testing --debug or sudo yunohost app upgrade movim -u https://github.com/YunoHost-Apps/movim_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index 70c9c4d..e4339ec 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # Movim pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/movim.svg)](https://dash.yunohost.org/appci/app/movim) ![](https://ci-apps.yunohost.org/ci/badges/movim.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/movim.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/movim.svg)](https://dash.yunohost.org/appci/app/movim) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/movim.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/movim.maintain.svg) [![Installer Movim avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=movim) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer Movim 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.* @@ -13,13 +17,14 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Client XMPP multiplateforme basé sur le Web -**Version incluse :** 0.19~ynh2 + +**Version incluse :** 0.19~ynh4 **Démo :** https://nl.movim.eu/?login ## Captures d'écran -![](./doc/screenshots/movim.png) +![Capture d'écran de Movim](./doc/screenshots/movim.png) ## Avertissements / informations importantes @@ -29,21 +34,22 @@ Client XMPP multiplateforme basé sur le Web ## Documentations et ressources -* Site officiel de l'app : https://movim.eu -* Documentation officielle de l'admin : https://github.com/movim/movim/wiki -* Dépôt de code officiel de l'app : https://github.com/movim/movim -* Documentation YunoHost pour cette app : https://yunohost.org/app_movim -* Signaler un bug : https://github.com/YunoHost-Apps/movim_ynh/issues +* Site 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 : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/movim_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/movim_ynh/tree/testing --debug ou sudo yunohost app upgrade movim -u https://github.com/YunoHost-Apps/movim_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :** diff --git a/check_process b/check_process index 7caa47e..ea5e366 100644 --- a/check_process +++ b/check_process @@ -2,9 +2,9 @@ ; Manifest domain="domain.tld" path="/path" - admin="john" - language="fr" is_public=1 + language="fr" + admin="john" password="1Strong-Password" ; Checks pkg_linter=1 @@ -18,6 +18,7 @@ upgrade=1 from_commit=80bdea70f80aafef673718911ad492ddc54aab5c backup_restore=1 multi_instance=0 + port_already_use=0 change_url=1 ;;; Options Email= diff --git a/conf/nginx.conf b/conf/nginx.conf index 6734801..277662f 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location __PATH__/ { # Path to source - alias __FINALPATH__/public/ ; + alias __FINALPATH__/public/; more_set_headers "Access-Control-Allow-Origin: *"; diff --git a/conf/systemd.service b/conf/systemd.service index bdbe66a..d3fe252 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,7 @@ User=__APP__ Group=__APP__ Environment=PUBLIC_URL=https://__DOMAIN____PATH__/ Environment=WS_PORT=__PORT__ -WorkingDirectory=__FINALPATH__ +WorkingDirectory=__FINALPATH__/ ExecStart=/usr/bin/php__PHPVERSION__ daemon.php start --url=${PUBLIC_URL} --port=${WS_PORT} StandardOutput=syslog SyslogIdentifier=__APP__ diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index 8c95830..b19f7de 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -1 +1 @@ -Client XMPP multiplateforme basé sur le Web +Client XMPP multiplateforme basé sur le Web diff --git a/manifest.json b/manifest.json index 942515f..64c294f 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Web-based cross-platform XMPP client", "fr": "Client XMPP multiplateforme basé sur le Web" }, - "version": "0.19~ynh3", + "version": "0.19~ynh4", "url": "https://movim.eu", "upstream": { "license": "AGPL-3.0-or-later", @@ -42,15 +42,15 @@ "example": "/movim", "default": "/movim" }, - { - "name": "admin", - "type": "user" - }, { "name": "is_public", "type": "boolean", "default": true }, + { + "name": "admin", + "type": "user" + }, { "name": "password", "type": "password" diff --git a/scripts/backup b/scripts/backup index ac96ed0..cc57d2b 100644 --- a/scripts/backup +++ b/scripts/backup @@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ynh_clean_check_starting + 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 d24bbe1..375f20e 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -28,6 +28,8 @@ ynh_script_progression --message="Loading installation settings..." # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get --app=$app --key=final_path) + +# Add settings here as needed by your application phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) port=$(ynh_app_setting_get --app=$app --key=port) @@ -39,6 +41,7 @@ ynh_script_progression --message="Backing up the app before changing its URL (ma # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { + ynh_clean_check_starting # 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" diff --git a/scripts/install b/scripts/install index 12d4b5f..8efcd6d 100644 --- a/scripts/install +++ b/scripts/install @@ -25,13 +25,14 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH -admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC +admin=$YNH_APP_ARG_ADMIN password=$YNH_APP_ARG_PASSWORD -timezone=$(cat /etc/timezone) app=$YNH_APP_INSTANCE_NAME +timezone=$(cat /etc/timezone) + #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= @@ -68,7 +69,6 @@ ynh_app_setting_set --app=$app --key=port --value=$port #================================================= ynh_script_progression --message="Installing dependencies..." -# Install packages ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies #================================================= @@ -110,14 +110,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -127,6 +119,14 @@ ynh_script_progression --message="Configuring PHP-FPM..." ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Configuring NGINX web server..." + +# Create a dedicated NGINX config +ynh_add_nginx_config + #================================================= # SPECIFIC SETUP #================================================= diff --git a/scripts/restore b/scripts/restore index da8297e..c05608f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -46,13 +46,6 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -72,6 +65,16 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# SPECIFIC RESTORATION +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." + +# Define and install dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= @@ -84,14 +87,11 @@ ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= -# SPECIFIC RESTORATION +# RESTORE THE NGINX CONFIGURATION #================================================= -# REINSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Reinstalling dependencies..." +ynh_script_progression --message="Restoring the NGINX web server configuration..." -# Define and install dependencies -ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE POSTGRESQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index cfc5796..0525a77 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -41,6 +41,7 @@ ynh_script_progression --message="Backing up the app before upgrading (may take # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { + ynh_clean_check_starting # Restore it if the upgrade fails ynh_restore_upgradebackup } @@ -87,7 +88,7 @@ fi ynh_script_progression --message="Making sure dedicated system user exists..." # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir=$final_path +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -98,7 +99,7 @@ then ynh_script_progression --message="Upgrading source files..." # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" + ynh_setup_source --dest_dir="$final_path" --keep="config/db.inc.php" # Temporary workaround to fix movim.ERROR: Error: Call to undefined function GuzzleHttp\Psr7\uri_for() ynh_replace_string --match_string="0.3.5" --replace_string="0.4.1" --target_file="$final_path/composer.json" @@ -108,14 +109,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -132,7 +125,15 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." ynh_add_fpm_config #================================================= -# SPECIFIC SETUP +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading NGINX web server configuration..." + +# Create a dedicated NGINX config +ynh_add_nginx_config + +#================================================= +# SPECIFIC UPGRADE #================================================= # UPDATE A CONFIG FILE #=================================================