From 6412da147ea0e1bf6ddecd03b0440c3dcef479f3 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 28 Feb 2023 19:24:37 +0100 Subject: [PATCH 01/10] Fix auto-updater --- .github/workflows/updater.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 8e97316..7185409 100755 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -79,11 +79,11 @@ checksum=$(sha256sum "$tempdir/$filename" | head -c 64) rm -rf $tempdir # Get extension -if [[ $filename == *.tar.gz ]]; then +#if [[ $filename == *.tar.gz ]]; then extension=tar.gz -else -extension=${filename##*.} -fi +#else +#extension=${filename##*.} +#fi # Rewrite source file cat < conf/$src.src @@ -92,7 +92,6 @@ SOURCE_SUM=$checksum SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=$extension SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= EOT echo "... conf/$src.src updated" From 343bc23e6da8e579254921baf47c7ba2b5c05d51 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 28 Feb 2023 19:28:10 +0100 Subject: [PATCH 02/10] Fix auto-updater --- .github/workflows/updater.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml index 236dc10..81d9902 100644 --- a/.github/workflows/updater.yml +++ b/.github/workflows/updater.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Fetch the source code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: token: ${{ secrets.GITHUB_TOKEN }} - name: Run the updater script @@ -33,13 +33,14 @@ jobs: - name: Create Pull Request id: cpr if: ${{ env.PROCEED == 'true' }} - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v4 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: Update to version ${{ env.VERSION }} committer: 'yunohost-bot ' author: 'yunohost-bot ' signoff: false + base: testing branch: ci-auto-update-v${{ env.VERSION }} delete-branch: true title: 'Upgrade to version ${{ env.VERSION }}' From 6d2761cd50f7432dd32e4795be8219e98a2fdadb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 9 Mar 2023 14:10:38 +0100 Subject: [PATCH 03/10] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 4c705df..8856a4d 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ version_commit="abc9d5154eeee86b2cb23b349a7326483249ee0c" -nodejs_version=12 +nodejs_version=16 #================================================= # PERSONAL HELPERS From 209f81ad90e9fd03d6fadc972c4e2fc5f2fc7edf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 9 Mar 2023 14:11:22 +0100 Subject: [PATCH 04/10] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 8856a4d..a70846c 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -version_commit="abc9d5154eeee86b2cb23b349a7326483249ee0c" +version_commit="9b43d41040b79cc8ad240dbadc66098bc8231c2b" nodejs_version=16 From 2c9b12835f826c2f3a55687f3ee3d61144feb026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 10 Mar 2023 08:05:02 +0100 Subject: [PATCH 05/10] 0.8.7 --- conf/app.src | 4 ++-- manifest.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/app.src b/conf/app.src index 3670edf..6ade810 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Awesome-Technologies/synapse-admin/archive/refs/tags/0.8.5.tar.gz -SOURCE_SUM=9d3a3fd8f110e937061e37ebf2298f824f171020df8933a229f2ec40684394a8 +SOURCE_URL=https://github.com/Awesome-Technologies/synapse-admin/releases/download/0.8.7/synapse-admin-0.8.7-dirty.tar.gz +SOURCE_SUM=3f74cbfec0a3b14b5684d1bded4816a7946d2e9b88b7186767189c14811224e9 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true \ No newline at end of file diff --git a/manifest.json b/manifest.json index 8d4101f..9ffaaee 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Admin UI for Synapse", "fr": "Admin UI pour Synapse" }, - "version": "0.8.5~ynh5", + "version": "0.8.7~ynh1", "url": "https://github.com/Awesome-Technologies/synapse-admin", "upstream": { "license": "Apache-2.0", @@ -17,14 +17,14 @@ "name": "" }, "requirements": { - "yunohost": ">= 11.0.9" + "yunohost": ">= 11.1.14" }, "multi_instance": false, "services": [ "nginx" ], "arguments": { - "install" : [ + "install": [ { "name": "domain", "type": "domain" From 7566f2eca4062a37053e0d1eaaee8eb589d241b7 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 10 Mar 2023 07:05:07 +0000 Subject: [PATCH 06/10] 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 6175b06..66028e8 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Admin UI for Synapse -**Shipped version:** 0.8.5~ynh5 +**Shipped version:** 0.8.7~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 414ea73..fba7e78 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Admin UI pour Synapse -**Version incluse :** 0.8.5~ynh5 +**Version incluse :** 0.8.7~ynh1 ## Captures d’écran From 4c7acbd70405ac43d8a74c02a6148f2cb8e32bb1 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 10 Apr 2023 17:39:53 +0200 Subject: [PATCH 07/10] Cleanup: app build is not needed anymore --- check_process | 5 +++ conf/.env | 8 ----- conf/nginx.conf | 15 ++------ conf/systemd.service | 16 --------- manifest.json | 2 +- scripts/_common.sh | 4 --- scripts/backup | 6 ---- scripts/change_url | 16 --------- scripts/install | 71 -------------------------------------- scripts/remove | 25 -------------- scripts/restore | 42 ----------------------- scripts/upgrade | 81 ++++++++------------------------------------ 12 files changed, 23 insertions(+), 268 deletions(-) delete mode 100644 conf/.env delete mode 100644 conf/systemd.service diff --git a/check_process b/check_process index e89ada0..e2b820a 100644 --- a/check_process +++ b/check_process @@ -15,9 +15,14 @@ setup_private=1 setup_public=1 upgrade=1 + upgrade=1 from_commit=4eaa242f11e8e9c6ed7afbb7cdf07fd95f8d04a1 backup_restore=1 multi_instance=0 change_url=1 ;;; Options Email= Notification=none +;;; Upgrade options + ; commit=4eaa242f11e8e9c6ed7afbb7cdf07fd95f8d04a1 + name=Upgrade from 0.8.5~ynh5 and remove app build + manifest_arg=domain=DOMAIN&synapse_app=synapse&synapse_domain=sub.domain.tld& diff --git a/conf/.env b/conf/.env deleted file mode 100644 index 3be4fc3..0000000 --- a/conf/.env +++ /dev/null @@ -1,8 +0,0 @@ -# This setting allows to fix the homeserver. -# If you set this setting, the user will not be able to select -# the server and have to use synapse-admin with this server. - -REACT_APP_SERVER=https://__SYNAPSE_DOMAIN__ - -#Define the port to avoid collisions on port 3000 -PORT=__PORT__ diff --git a/conf/nginx.conf b/conf/nginx.conf index 0880bcd..0ac62b9 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,19 +1,10 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - proxy_pass http://127.0.0.1:__PORT__; - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Host $server_name; - - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; + alias __FINAL_PATH__/; - client_max_body_size 50M; + index index.html; + try_files $uri $uri/ /index.html; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; diff --git a/conf/systemd.service b/conf/systemd.service deleted file mode 100644 index 679d91d..0000000 --- a/conf/systemd.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Synapse Admin -After=network.target - -[Service] -Type=simple -User=__APP__ -Group=__APP__ -WorkingDirectory=__FINALPATH__ -Environment="PATH=__ENV_PATH__" -Environment="NODE_ENV=production" -ExecStart=/usr/bin/yarn start -p __PORT__ -Restart=always - -[Install] -WantedBy=multi-user.target diff --git a/manifest.json b/manifest.json index 9ffaaee..86a2ca2 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Admin UI for Synapse", "fr": "Admin UI pour Synapse" }, - "version": "0.8.7~ynh1", + "version": "0.8.7~ynh2", "url": "https://github.com/Awesome-Technologies/synapse-admin", "upstream": { "license": "Apache-2.0", diff --git a/scripts/_common.sh b/scripts/_common.sh index a70846c..944a65e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,10 +4,6 @@ # COMMON VARIABLES #================================================= -version_commit="9b43d41040b79cc8ad240dbadc66098bc8231c2b" - -nodejs_version=16 - #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index e9ea8a1..a471a71 100644 --- a/scripts/backup +++ b/scripts/backup @@ -52,12 +52,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/${synapse_domain}.d/$app.endpoint.conf" ynh_backup --src_path="/etc/logrotate.d/$app" -#================================================= -# BACKUP SYSTEMD -#================================================= - -ynh_backup --src_path="/etc/systemd/system/$app.service" - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/change_url b/scripts/change_url index 18ec2f6..3ac2903 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -28,7 +28,6 @@ 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) -port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP @@ -65,13 +64,6 @@ fi #================================================= # STANDARD MODIFICATIONS -#================================================= -# STOP SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Stopping a systemd service..." --weight=1 - -ynh_systemd_action --service_name=$app --action=stop --log_path="systemd" - #================================================= # MODIFY URL IN NGINX CONF #================================================= @@ -103,14 +95,6 @@ fi #================================================= # GENERIC FINALISATION -#================================================= -# START SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=1 - -# Start a systemd service -ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="HTTP Server listening" - #================================================= # RELOAD NGINX #================================================= diff --git a/scripts/install b/scripts/install index e0dfae6..0fe4e0a 100644 --- a/scripts/install +++ b/scripts/install @@ -53,26 +53,6 @@ ynh_app_setting_set --app=$app --key=synapse_port --value=$synapse_port #================================================= # STANDARD MODIFICATIONS -#================================================= -# FIND AND OPEN A PORT -#================================================= -ynh_script_progression --message="Finding an available port..." --weight=2 - -# Find an available port -port=$(ynh_find_port --port=9090) -ynh_app_setting_set --app=$app --key=port --value=$port - -#================================================= -# INSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Installing dependencies..." --weight=20 - -# Install Nodejs -ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version - -# Install Yarn -ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" - #================================================= # CREATE DEDICATED USER #================================================= @@ -108,57 +88,6 @@ ynh_add_config --template="endpoint.nginx.conf" --destination="/etc/nginx/conf.d #================================================= # SPECIFIC SETUP #============================================== -# INSTALL SYNAPSE-ADMIN -#============================================== -ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=40 - -pushd "$final_path" - ynh_use_nodejs - ynh_exec_warn_less yarn install - ynh_exec_warn_less yarn build -popd - -#================================================= -# ADD A CONFIGURATION -#================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 - -ynh_add_config --template="../conf/.env" --destination="$final_path/.env" - -chown -R $app:www-data "$final_path" - -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Configuring a systemd service..." --weight=1 - -env_path="$PATH" -ynh_add_systemd_config - -#================================================= -# 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..." - -yunohost service add $app --description "UI admin for Synapse" --log="/var/log/$app/$app.log" - -#================================================= -# START SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=2 - -# Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #--line_match="HTTP Server listening" - -#================================================= # SETUP SSOWAT #================================================= ynh_script_progression --message="Configuring permissions..." --weight=1 diff --git a/scripts/remove b/scripts/remove index 3661268..7aae0d6 100644 --- a/scripts/remove +++ b/scripts/remove @@ -17,7 +17,6 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 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) synapse_app=$(ynh_app_setting_get --app=$app --key=synapse_app) synapse_domain=$(ynh_app_setting_get --app=$synapse_app --key=domain) @@ -35,30 +34,6 @@ 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 DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - -# Remove metapackage and its dependencies -ynh_remove_nodejs - #================================================= # REMOVE APP MAIN DIR #================================================= diff --git a/scripts/restore b/scripts/restore index e9610b3..7c7ec30 100644 --- a/scripts/restore +++ b/scripts/restore @@ -64,48 +64,6 @@ 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..." --weight=7 - -# Install Nodejs -ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version - -# Install Yarn -ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" - -#================================================= -# RESTORE SYSTEMD -#================================================= -ynh_script_progression --message="Restoring the systemd configuration..." --weight=5 - -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 - -ynh_restore_file --origin_path="/etc/logrotate.d/$app" - -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." - -yunohost service add $app --description "UI admin for Synapse" --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="systemd" #--line_match="HTTP Server listening" - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 3f070a4..535f29d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -64,6 +64,19 @@ if [ -z "$synapse_app" ]; then ynh_app_setting_set --app=$app --key=synapse_app --value=$synapse_app fi +# Delete service and nodejs dependencies +if ynh_compare_current_package_version --comparison lt --version 0.8.7~ynh1 +then + ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" + yunohost service remove $app + ynh_remove_nodejs + ynh_remove_logrotate + ynh_remove_app_dependencies + + ynh_app_setting_delete --app=$app --key=synapse_port + ynh_app_setting_delete --app=$app --key=port +fi + # Reload and store Synapse's settings, in case of they changed synapse_domain=$(ynh_app_setting_get --app=$synapse_app --key=domain) synapse_port=$(ynh_app_setting_get --app=$synapse_app --key=synapse_port) @@ -72,13 +85,6 @@ ynh_app_setting_set --app=$app --key=synapse_port --value=$synapse_port #================================================= # STANDARD UPGRADE STEPS -#================================================= -# STOP SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Stopping a systemd service..." --weight=1 - -ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" - #================================================= # CREATE DEDICATED USER #================================================= @@ -95,7 +101,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=160 - ynh_setup_source --dest_dir="$final_path" --keep=".env" + ynh_setup_source --dest_dir="$final_path" fi chmod 750 "$final_path" @@ -113,65 +119,6 @@ ynh_add_nginx_config # Create NGINX config to access /_synapse/admin endpoint ynh_add_config --template="endpoint.nginx.conf" --destination="/etc/nginx/conf.d/${synapse_domain}.d/$app.endpoint.conf" -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=18 - -# Install Nodejs -ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version - -# Install Yarn -ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" - -#================================================= -# SPECIFIC UPGRADE -#============================================== -# INSTALL CODIMD -#============================================== -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=60 - - pushd "$final_path" - ynh_use_nodejs - ynh_exec_warn_less yarn install - ynh_exec_warn_less yarn build - popd -fi - -#================================================= -# ADD A CONFIGURATION -#================================================= -#ynh_script_progression --message="Adding a configuration file..." --weight=1 - -#ynh_add_config --template="../conf/.env" --destination="$final_path/.env" - -#chown -R $app:www-data "$final_path" - -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Configuring a systemd service..." --weight=2 - -env_path="$PATH" -# Create a dedicated systemd config -ynh_add_systemd_config - -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." - -yunohost service add $app --description "UI admin for Synapse" --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=systemd #--line_match="HTTP Server listening" - #================================================= # RELOAD NGINX #================================================= From 51909a8280a04ffedf6b4eb707313f700091effa Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 10 Apr 2023 15:41:11 +0000 Subject: [PATCH 08/10] 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 66028e8..b654e07 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Admin UI for Synapse -**Shipped version:** 0.8.7~ynh1 +**Shipped version:** 0.8.7~ynh2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index fba7e78..58f966b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Admin UI pour Synapse -**Version incluse :** 0.8.7~ynh1 +**Version incluse :** 0.8.7~ynh2 ## Captures d’écran From d7912388302e61fd8f8b4fcd4ecbeba260d1afa6 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 10 Apr 2023 17:46:43 +0200 Subject: [PATCH 09/10] Update script progression --- scripts/upgrade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 535f29d..bfd2104 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -31,7 +31,7 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up $app before upgrading (may take a while)..." --weight=20 +ynh_script_progression --message="Backing up $app before upgrading (may take a while)..." --weight=5 # Backup the current version of the app ynh_backup_before_upgrade @@ -99,7 +99,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" if [ "$upgrade_type" == "UPGRADE_APP" ] then - ynh_script_progression --message="Upgrading source files..." --weight=160 + ynh_script_progression --message="Upgrading source files..." --weight=2 ynh_setup_source --dest_dir="$final_path" fi @@ -111,7 +111,7 @@ chown -R $app:www-data "$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 # Create a dedicated nginx config ynh_add_nginx_config From a446f29bbf3a9c95ddccc80ae4b1b966e8b31a9b Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 10 Apr 2023 18:14:52 +0200 Subject: [PATCH 10/10] No logrotate needed anymore --- scripts/backup | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/backup b/scripts/backup index a471a71..8fd8f89 100644 --- a/scripts/backup +++ b/scripts/backup @@ -46,12 +46,6 @@ ynh_backup --src_path="$final_path" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/nginx/conf.d/${synapse_domain}.d/$app.endpoint.conf" -#================================================= -# BACKUP LOGROTATE -#================================================= - -ynh_backup --src_path="/etc/logrotate.d/$app" - #================================================= # END OF SCRIPT #=================================================