From 3d206b633789c8229edef6392395fd7e7cf365bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 18 Aug 2023 11:30:53 +0200 Subject: [PATCH 1/6] Update manifest.toml --- manifest.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 212f68e..041d0d7 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ admindoc = "https://easyappointments.org/docs.html#1.4.3/readme.md" code = "https://github.com/alextselegidis/easyappointments" [integration] -yunohost = ">= 11.1.15" +yunohost = ">= 11.2" architectures = "all" multi_instance = true ldap = false @@ -29,7 +29,6 @@ ram.runtime = "50M" [install] [install.domain] type = "domain" - full_domain = true [install.init_main_permission] type = "group" From 3408ae0b255f00c215b2d54b6535370d02ff8487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 10 Sep 2023 08:16:53 +0200 Subject: [PATCH 2/6] cleaning --- .github/workflows/updater.sh | 130 ----------------------------------- check_process | 22 ------ manifest.toml | 2 +- 3 files changed, 1 insertion(+), 153 deletions(-) delete mode 100755 .github/workflows/updater.sh delete mode 100644 check_process diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh deleted file mode 100755 index 8fdfb5a..0000000 --- a/.github/workflows/updater.sh +++ /dev/null @@ -1,130 +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 -# 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 - *"easyappointments-"*".zip") - src="app" - ;; -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=zip -SOURCE_IN_SUBDIR=false -SOURCE_EXTRACT=true -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 698cc84..0000000 --- a/check_process +++ /dev/null @@ -1,22 +0,0 @@ -;; Test complet - ; Manifest - domain="domain.tld" - is_public=1 - language="english" - ; Checks - pkg_linter=1 - setup_sub_dir=0 - setup_root=1 - setup_nourl=0 - setup_private=1 - setup_public=1 - upgrade=1 - # 1.4.3~ynh1 - upgrade=1 from_commit=e7afe099868faab80c14135cc4a11c1a82128f81 - backup_restore=1 - multi_instance=1 - port_already_use=0 - change_url=1 -;;; Options -Email= -Notification=none diff --git a/manifest.toml b/manifest.toml index 041d0d7..c06022d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -56,7 +56,7 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "mariadb-server php8.0-mbstring php8.0-gd php8.0-curl php8.0-mysql" + packages = "mariadb-server, php8.2-mbstring, php8.2-gd, php8.2-curl, php8.2-mysql" [resources.database] type = "mysql" From 60450fb034c1e3b82b379c2c8d903c29b865a08b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 10 Sep 2023 08:17:08 +0200 Subject: [PATCH 3/6] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index c06022d..48e4609 100644 --- a/manifest.toml +++ b/manifest.toml @@ -37,7 +37,7 @@ ram.runtime = "50M" [install.language] ask.en = "Choose the application language" ask.fr = "Choisissez la langue de l'application" - type = "string" + type = "select" choices = ["french", "english"] default = "english" From d6772d197d37b7a0fb2b343b686f78b2b1ada9e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 10 Sep 2023 09:02:49 +0200 Subject: [PATCH 4/6] cleaning --- conf/nginx.conf | 4 ++-- doc/DESCRIPTION_fr.md | 11 +++++++++++ manifest.toml | 4 ++-- scripts/change_url | 1 - scripts/install | 9 ++------- scripts/remove | 17 +++-------------- scripts/restore | 27 +++++++++++---------------- scripts/upgrade | 9 ++------- 8 files changed, 33 insertions(+), 49 deletions(-) create mode 100644 doc/DESCRIPTION_fr.md diff --git a/conf/nginx.conf b/conf/nginx.conf index 9a96ccd..2dad80d 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,12 +2,12 @@ location __PATH__/ { # Path to source - alias __INSTALL_DIR__/ ; + alias __INSTALL_DIR__/; index index.php; # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file - #client_max_body_size 50M; + client_max_body_size 50M; try_files $uri $uri/ index.php; location ~ [^/]\.php(/|$) { diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..0c4ae3a --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1,11 @@ +Easy!Appointments est une application Web hautement personnalisable qui permet aux clients de prendre rendez-vous avec vous via une interface Web sophistiquée. De plus, il offre la possibilité de synchroniser vos données avec Google Agenda afin que vous puissiez les utiliser avec d'autres services. Il s'agit d'un projet open source que vous pouvez télécharger et installer même pour un usage commercial. Easy!Appointments fonctionnera sans problème avec votre site Web existant car il peut être installé dans un seul dossier du serveur et bien sûr partager une base de données existante. + +### Caractéristiques + +- Gestion des clients et des rendez-vous. +- Organisation des services et prestataires. +- Plan de travail et règles de réservation. +- Synchronisation de Google Agenda. +- Système de notifications par e-mail. +- Installation auto-hébergée. +- Interface utilisateur traduite. diff --git a/manifest.toml b/manifest.toml index 48e4609..851dfd4 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Easy!Appointments" description.en = "Open Source Appointment Scheduler" description.fr = "Planificateur de rendez-vous Open Source" -version = "1.4.3~ynh2" +version = "1.4.3~ynh3" maintainers = ["eric_G"] @@ -23,7 +23,7 @@ multi_instance = true ldap = false sso = false disk = "50M" -ram.build = "50M" +ram.build = "700M" ram.runtime = "50M" [install] diff --git a/scripts/change_url b/scripts/change_url index e976fa8..ffe6c72 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -25,7 +25,6 @@ ynh_change_url_nginx_config #================================================= ynh_script_progression --message="Updating a configuration file..." --weight=1 -domain=$new_domain ynh_add_config --template="../conf/config.php" --destination="$install_dir/config.php" chmod 400 "$install_dir/config.php" diff --git a/scripts/install b/scripts/install index b1eccdb..5d35ee6 100644 --- a/scripts/install +++ b/scripts/install @@ -22,18 +22,13 @@ chown -R $app:www-data "$install_dir" chmod -R 770 "$install_dir/storage" #================================================= -# NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=2 +ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 - # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=low --footprint=low diff --git a/scripts/remove b/scripts/remove index 03958b9..e69e0af 100644 --- a/scripts/remove +++ b/scripts/remove @@ -10,26 +10,15 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# STOP AND REMOVE SERVICE +# REMOVE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." --weight=2 - -# Remove the dedicated systemd config -ynh_remove_systemd_config - +# REMOVE SYSTEMD SERVICE #================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=3 - # Remove the dedicated PHP-FPM config ynh_remove_fpm_config diff --git a/scripts/restore b/scripts/restore index 98a5ec0..f955e14 100644 --- a/scripts/restore +++ b/scripts/restore @@ -10,15 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# 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" - #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -29,13 +20,6 @@ ynh_restore_file --origin_path="$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=50 - -ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" - #================================================= # RESTORE THE MYSQL DATABASE #================================================= @@ -43,6 +27,17 @@ ynh_script_progression --message="Restoring the MySQL database..." --weight=5 ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql +#================================================= +# RESTORE SYSTEM CONFIGURATIONS +#================================================= +# RESTORE THE PHP-FPM CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 + +ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index fcae6e7..5251726 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -32,18 +32,13 @@ chown -R $app:www-data "$install_dir" chmod -R 770 "$install_dir/storage" #================================================= -# NGINX CONFIGURATION +# REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 +ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 - # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=low --footprint=low From 701601fb330008bf719a798f3a9624ef3b35df75 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 10 Sep 2023 07:02:53 +0000 Subject: [PATCH 5/6] Auto-update README --- README.md | 2 +- README_fr.md | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 69f2192..387d4e1 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ The application is designed to be flexible enough so that it can handle any ente - Translated user interface. -**Shipped version:** 1.4.3~ynh2 +**Shipped version:** 1.4.3~ynh3 **Demo:** https://demo.easyappointments.org/ diff --git a/README_fr.md b/README_fr.md index d0c14f8..729b60e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -16,21 +16,20 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po ## Vue d’ensemble -Easy!Appointments is a highly customizable web application that allows customers to book appointments with you via a sophisticated web interface. Moreover, it provides the ability to sync your data with Google Calendar so you can use them with other services. It is an open source project that you can download and install even for commercial use. Easy!Appointments will run smoothly with your existing website as it can be installed in a single folder of the server and of course share an existing database. +Easy!Appointments est une application Web hautement personnalisable qui permet aux clients de prendre rendez-vous avec vous via une interface Web sophistiquée. De plus, il offre la possibilité de synchroniser vos données avec Google Agenda afin que vous puissiez les utiliser avec d'autres services. Il s'agit d'un projet open source que vous pouvez télécharger et installer même pour un usage commercial. Easy!Appointments fonctionnera sans problème avec votre site Web existant car il peut être installé dans un seul dossier du serveur et bien sûr partager une base de données existante. -### Features -The application is designed to be flexible enough so that it can handle any enterprise work flow. +### Caractéristiques -- Customers and appointments management. -- Services and providers organization. -- Working plan and booking rules. -- Google Calendar synchronization. -- Email notifications system. -- Self hosted installation. -- Translated user interface. +- Gestion des clients et des rendez-vous. +- Organisation des services et prestataires. +- Plan de travail et règles de réservation. +- Synchronisation de Google Agenda. +- Système de notifications par e-mail. +- Installation auto-hébergée. +- Interface utilisateur traduite. -**Version incluse :** 1.4.3~ynh2 +**Version incluse :** 1.4.3~ynh3 **Démo :** https://demo.easyappointments.org/ From 8295c9b0381d784673a78d9a5649faa68e3ed555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 10 Sep 2023 09:25:10 +0200 Subject: [PATCH 6/6] Update change_url --- scripts/change_url | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/change_url b/scripts/change_url index ffe6c72..e976fa8 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -25,6 +25,7 @@ ynh_change_url_nginx_config #================================================= ynh_script_progression --message="Updating a configuration file..." --weight=1 +domain=$new_domain ynh_add_config --template="../conf/config.php" --destination="$install_dir/config.php" chmod 400 "$install_dir/config.php"