1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mattermost_ynh.git synced 2024-09-03 19:36:29 +02:00
mattermost_ynh/scripts/restore

69 lines
2.3 KiB
Text
Raw Normal View History

2017-09-11 12:05:16 +02:00
#!/bin/bash
2021-01-11 23:46:48 +01:00
#=================================================
# GENERIC START
2017-09-11 12:05:16 +02:00
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2021-01-11 23:46:48 +01:00
source ../settings/scripts/_common.sh
2017-09-11 12:05:16 +02:00
source /usr/share/yunohost/helpers
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
2021-01-11 23:46:48 +01:00
ynh_script_progression --message="Restoring the app main directory..." --weight=2
2017-09-11 12:05:16 +02:00
Testing (#435) * scripts: reduce pgloader's prefetched columns This helps fixing stack overflow errors on large databases. * scripts: increase the migration timeout again It seems to be too short on some lesser-powered VMs. * Update manifest.json * Auto-update README * [autopatch] Fix Host and X-Forwarded-For header spoofing * conf: upgrade to Mattermost ESR 8.1.1 (#431) https://docs.mattermost.com/install/self-managed-changelog.html#release-v8-1-extended-support-release * Packaging format v2 (#406) * backup script for PostgreSQL (#376) Inspired from https://github.com/YunoHost-Apps/moodle_ynh/blob/master/scripts/backup * Adapt to PostgreSQL (#375) Question: in https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server, I see `BindsTo=postgresql.service` while in the original file here I find `Requires=mysql.service`. I don't know which one makes sense, so I keep the orinigal Yunohost version (Requires) * config.json for PostgreSQL (#374) Inspired from the original MySQL config.json and from Mattermost documentation https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server * Install with PostgreSQL (#373) I took inspiration from https://github.com/YunoHost-Apps/commento_ynh/blob/master/scripts/install * install postgresql * Reordering * reset config file * Update _common.sh * Update config.json * Fix * Migration (#382) * add migration * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Fix * Fix * Fix * Update install * Update upgrade * Fix * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update install * Fix * Fix * Fix * Update upgrade * Cleaning up * Update upgrade * Update _common.sh * Update check_process * Update _common.sh * Fix * Update mysql-to-pg.conf * Update upgrade * Update systemd.service * Cleaning * Update _common.sh * Fix * Update upgrade * Update _common.sh * Update upgrade * Update backup * Fix * Fix * Update upgrade * Update upgrade * Update systemd.service * Update _common.sh * Revert "Update _common.sh" This reverts commit d880150af94cc164c69802f4ae46d7e6529482f9. * Cleaning * Fix * Update check_process * Fix * Update _common.sh * Fix * Update _common.sh * Fix * Update manifest.json * Update install * Update _common.sh * Update upgrade * Fix * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Auto-update README * Update _common.sh * Upgrade to v7.4.0 * Auto-update README * Upgrade to v7.5.2 * Auto-update README * Update config.json * [fix] mariadb to postgres migration * Auto-update README * [fix] Update manifest requirements * Update manifest.json * Update config.json * upgrade config to upstream * Fix linter * Update _common.sh * v2 * Fix * Auto-update README * Fix * Auto-update README * Update upgrade * Fix * Cleaning * add apt * Auto-update README * cleaning * fix data path var * fix * Auto-update README * Update backup * add more apt * Update manifest.toml * Update tests.toml * Fix * Update _common.sh * Update upgrade * Update restore * Update remove * cleaning * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update manifest.toml * 7.7.1 * Update manifest.json * Auto-update README * Update config.json * Auto-update README * cleaning * Auto-update README * Update ADMIN.md * Update ADMIN_fr.md * fix * Delete check_process * 7.8.1 * Auto-update README * Auto-update README * Update manifest.toml * Auto-update README * fix migration from 7.3.0 * Update manifest.toml * fix migration from 7.3.0 * cleaning * Update manifest.toml * src * Update upgrade * Update upgrade * Update tests.toml * remove src * 7.9.1 * Auto-update README * Update config.json * Update doc/DESCRIPTION.md Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Auto-update README * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update upgrade * Update install * Update DESCRIPTION_fr.md * Auto-update README * Update _common.sh * Update manifest.toml * Update manifest.toml * Auto-update README * Update manifest.toml * Update upgrade * Update manifest.toml * Auto-update README * cleaning * Auto-update README * Update nginx.conf * Update manifest.toml * Auto-update README * cleaning * Update doc/ADMIN.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update doc/ADMIN_fr.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * 8.0.0 * Auto-update README * Update manifest.toml * Auto-update README * 8.1.0 * Auto-update README * Update upgrade * Update tests.toml * Update tests.toml * Update _common.sh * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml * DEBUG: see if other migrations pass (#430) * Update manifest.toml * Auto-update README * Revert "DEBUG: see if other migrations pass (#430)" This reverts commit 8532bd3ba2d60c77527a1b92f63e5c6b1dd3659b. * Update tests.toml * scripts: fix MySQL migration The PostgreSQL database has already been created, no need to create it manually. * scripts: improve DB migration comment * Update config.json * Update tests.toml * Fix v2 database deletion on error (#434) * scripts: improve comments * scripts: manually remove MariaDB database if needed --------- Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update manifest.toml * Auto-update README * Update manifest.toml * Auto-update README --------- Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: tituspijean <titus+yunohost@pijean.ovh> Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
2023-09-11 21:36:20 +02:00
ynh_restore_file --origin_path="$install_dir"
2017-09-11 12:05:16 +02:00
Testing (#435) * scripts: reduce pgloader's prefetched columns This helps fixing stack overflow errors on large databases. * scripts: increase the migration timeout again It seems to be too short on some lesser-powered VMs. * Update manifest.json * Auto-update README * [autopatch] Fix Host and X-Forwarded-For header spoofing * conf: upgrade to Mattermost ESR 8.1.1 (#431) https://docs.mattermost.com/install/self-managed-changelog.html#release-v8-1-extended-support-release * Packaging format v2 (#406) * backup script for PostgreSQL (#376) Inspired from https://github.com/YunoHost-Apps/moodle_ynh/blob/master/scripts/backup * Adapt to PostgreSQL (#375) Question: in https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server, I see `BindsTo=postgresql.service` while in the original file here I find `Requires=mysql.service`. I don't know which one makes sense, so I keep the orinigal Yunohost version (Requires) * config.json for PostgreSQL (#374) Inspired from the original MySQL config.json and from Mattermost documentation https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server * Install with PostgreSQL (#373) I took inspiration from https://github.com/YunoHost-Apps/commento_ynh/blob/master/scripts/install * install postgresql * Reordering * reset config file * Update _common.sh * Update config.json * Fix * Migration (#382) * add migration * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Fix * Fix * Fix * Update install * Update upgrade * Fix * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update install * Fix * Fix * Fix * Update upgrade * Cleaning up * Update upgrade * Update _common.sh * Update check_process * Update _common.sh * Fix * Update mysql-to-pg.conf * Update upgrade * Update systemd.service * Cleaning * Update _common.sh * Fix * Update upgrade * Update _common.sh * Update upgrade * Update backup * Fix * Fix * Update upgrade * Update upgrade * Update systemd.service * Update _common.sh * Revert "Update _common.sh" This reverts commit d880150af94cc164c69802f4ae46d7e6529482f9. * Cleaning * Fix * Update check_process * Fix * Update _common.sh * Fix * Update _common.sh * Fix * Update manifest.json * Update install * Update _common.sh * Update upgrade * Fix * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Auto-update README * Update _common.sh * Upgrade to v7.4.0 * Auto-update README * Upgrade to v7.5.2 * Auto-update README * Update config.json * [fix] mariadb to postgres migration * Auto-update README * [fix] Update manifest requirements * Update manifest.json * Update config.json * upgrade config to upstream * Fix linter * Update _common.sh * v2 * Fix * Auto-update README * Fix * Auto-update README * Update upgrade * Fix * Cleaning * add apt * Auto-update README * cleaning * fix data path var * fix * Auto-update README * Update backup * add more apt * Update manifest.toml * Update tests.toml * Fix * Update _common.sh * Update upgrade * Update restore * Update remove * cleaning * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update manifest.toml * 7.7.1 * Update manifest.json * Auto-update README * Update config.json * Auto-update README * cleaning * Auto-update README * Update ADMIN.md * Update ADMIN_fr.md * fix * Delete check_process * 7.8.1 * Auto-update README * Auto-update README * Update manifest.toml * Auto-update README * fix migration from 7.3.0 * Update manifest.toml * fix migration from 7.3.0 * cleaning * Update manifest.toml * src * Update upgrade * Update upgrade * Update tests.toml * remove src * 7.9.1 * Auto-update README * Update config.json * Update doc/DESCRIPTION.md Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Auto-update README * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update upgrade * Update install * Update DESCRIPTION_fr.md * Auto-update README * Update _common.sh * Update manifest.toml * Update manifest.toml * Auto-update README * Update manifest.toml * Update upgrade * Update manifest.toml * Auto-update README * cleaning * Auto-update README * Update nginx.conf * Update manifest.toml * Auto-update README * cleaning * Update doc/ADMIN.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update doc/ADMIN_fr.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * 8.0.0 * Auto-update README * Update manifest.toml * Auto-update README * 8.1.0 * Auto-update README * Update upgrade * Update tests.toml * Update tests.toml * Update _common.sh * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml * DEBUG: see if other migrations pass (#430) * Update manifest.toml * Auto-update README * Revert "DEBUG: see if other migrations pass (#430)" This reverts commit 8532bd3ba2d60c77527a1b92f63e5c6b1dd3659b. * Update tests.toml * scripts: fix MySQL migration The PostgreSQL database has already been created, no need to create it manually. * scripts: improve DB migration comment * Update config.json * Update tests.toml * Fix v2 database deletion on error (#434) * scripts: improve comments * scripts: manually remove MariaDB database if needed --------- Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update manifest.toml * Auto-update README * Update manifest.toml * Auto-update README --------- Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: tituspijean <titus+yunohost@pijean.ovh> Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
2023-09-11 21:36:20 +02:00
chown -R $app:www-data "$install_dir"
2021-09-16 11:39:20 +02:00
2017-09-11 12:05:16 +02:00
#=================================================
2021-09-16 11:39:20 +02:00
# RESTORE THE DATA DIRECTORY
#=================================================
2021-09-16 11:39:20 +02:00
ynh_script_progression --message="Restoring the data directory..." --weight=4
Testing (#435) * scripts: reduce pgloader's prefetched columns This helps fixing stack overflow errors on large databases. * scripts: increase the migration timeout again It seems to be too short on some lesser-powered VMs. * Update manifest.json * Auto-update README * [autopatch] Fix Host and X-Forwarded-For header spoofing * conf: upgrade to Mattermost ESR 8.1.1 (#431) https://docs.mattermost.com/install/self-managed-changelog.html#release-v8-1-extended-support-release * Packaging format v2 (#406) * backup script for PostgreSQL (#376) Inspired from https://github.com/YunoHost-Apps/moodle_ynh/blob/master/scripts/backup * Adapt to PostgreSQL (#375) Question: in https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server, I see `BindsTo=postgresql.service` while in the original file here I find `Requires=mysql.service`. I don't know which one makes sense, so I keep the orinigal Yunohost version (Requires) * config.json for PostgreSQL (#374) Inspired from the original MySQL config.json and from Mattermost documentation https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server * Install with PostgreSQL (#373) I took inspiration from https://github.com/YunoHost-Apps/commento_ynh/blob/master/scripts/install * install postgresql * Reordering * reset config file * Update _common.sh * Update config.json * Fix * Migration (#382) * add migration * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Fix * Fix * Fix * Update install * Update upgrade * Fix * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update install * Fix * Fix * Fix * Update upgrade * Cleaning up * Update upgrade * Update _common.sh * Update check_process * Update _common.sh * Fix * Update mysql-to-pg.conf * Update upgrade * Update systemd.service * Cleaning * Update _common.sh * Fix * Update upgrade * Update _common.sh * Update upgrade * Update backup * Fix * Fix * Update upgrade * Update upgrade * Update systemd.service * Update _common.sh * Revert "Update _common.sh" This reverts commit d880150af94cc164c69802f4ae46d7e6529482f9. * Cleaning * Fix * Update check_process * Fix * Update _common.sh * Fix * Update _common.sh * Fix * Update manifest.json * Update install * Update _common.sh * Update upgrade * Fix * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Auto-update README * Update _common.sh * Upgrade to v7.4.0 * Auto-update README * Upgrade to v7.5.2 * Auto-update README * Update config.json * [fix] mariadb to postgres migration * Auto-update README * [fix] Update manifest requirements * Update manifest.json * Update config.json * upgrade config to upstream * Fix linter * Update _common.sh * v2 * Fix * Auto-update README * Fix * Auto-update README * Update upgrade * Fix * Cleaning * add apt * Auto-update README * cleaning * fix data path var * fix * Auto-update README * Update backup * add more apt * Update manifest.toml * Update tests.toml * Fix * Update _common.sh * Update upgrade * Update restore * Update remove * cleaning * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update manifest.toml * 7.7.1 * Update manifest.json * Auto-update README * Update config.json * Auto-update README * cleaning * Auto-update README * Update ADMIN.md * Update ADMIN_fr.md * fix * Delete check_process * 7.8.1 * Auto-update README * Auto-update README * Update manifest.toml * Auto-update README * fix migration from 7.3.0 * Update manifest.toml * fix migration from 7.3.0 * cleaning * Update manifest.toml * src * Update upgrade * Update upgrade * Update tests.toml * remove src * 7.9.1 * Auto-update README * Update config.json * Update doc/DESCRIPTION.md Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Auto-update README * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update upgrade * Update install * Update DESCRIPTION_fr.md * Auto-update README * Update _common.sh * Update manifest.toml * Update manifest.toml * Auto-update README * Update manifest.toml * Update upgrade * Update manifest.toml * Auto-update README * cleaning * Auto-update README * Update nginx.conf * Update manifest.toml * Auto-update README * cleaning * Update doc/ADMIN.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update doc/ADMIN_fr.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * 8.0.0 * Auto-update README * Update manifest.toml * Auto-update README * 8.1.0 * Auto-update README * Update upgrade * Update tests.toml * Update tests.toml * Update _common.sh * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml * DEBUG: see if other migrations pass (#430) * Update manifest.toml * Auto-update README * Revert "DEBUG: see if other migrations pass (#430)" This reverts commit 8532bd3ba2d60c77527a1b92f63e5c6b1dd3659b. * Update tests.toml * scripts: fix MySQL migration The PostgreSQL database has already been created, no need to create it manually. * scripts: improve DB migration comment * Update config.json * Update tests.toml * Fix v2 database deletion on error (#434) * scripts: improve comments * scripts: manually remove MariaDB database if needed --------- Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update manifest.toml * Auto-update README * Update manifest.toml * Auto-update README --------- Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: tituspijean <titus+yunohost@pijean.ovh> Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
2023-09-11 21:36:20 +02:00
ynh_restore_file --origin_path="$data_dir" --not_mandatory
Testing (#435) * scripts: reduce pgloader's prefetched columns This helps fixing stack overflow errors on large databases. * scripts: increase the migration timeout again It seems to be too short on some lesser-powered VMs. * Update manifest.json * Auto-update README * [autopatch] Fix Host and X-Forwarded-For header spoofing * conf: upgrade to Mattermost ESR 8.1.1 (#431) https://docs.mattermost.com/install/self-managed-changelog.html#release-v8-1-extended-support-release * Packaging format v2 (#406) * backup script for PostgreSQL (#376) Inspired from https://github.com/YunoHost-Apps/moodle_ynh/blob/master/scripts/backup * Adapt to PostgreSQL (#375) Question: in https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server, I see `BindsTo=postgresql.service` while in the original file here I find `Requires=mysql.service`. I don't know which one makes sense, so I keep the orinigal Yunohost version (Requires) * config.json for PostgreSQL (#374) Inspired from the original MySQL config.json and from Mattermost documentation https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server * Install with PostgreSQL (#373) I took inspiration from https://github.com/YunoHost-Apps/commento_ynh/blob/master/scripts/install * install postgresql * Reordering * reset config file * Update _common.sh * Update config.json * Fix * Migration (#382) * add migration * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Fix * Fix * Fix * Update install * Update upgrade * Fix * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update install * Fix * Fix * Fix * Update upgrade * Cleaning up * Update upgrade * Update _common.sh * Update check_process * Update _common.sh * Fix * Update mysql-to-pg.conf * Update upgrade * Update systemd.service * Cleaning * Update _common.sh * Fix * Update upgrade * Update _common.sh * Update upgrade * Update backup * Fix * Fix * Update upgrade * Update upgrade * Update systemd.service * Update _common.sh * Revert "Update _common.sh" This reverts commit d880150af94cc164c69802f4ae46d7e6529482f9. * Cleaning * Fix * Update check_process * Fix * Update _common.sh * Fix * Update _common.sh * Fix * Update manifest.json * Update install * Update _common.sh * Update upgrade * Fix * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Auto-update README * Update _common.sh * Upgrade to v7.4.0 * Auto-update README * Upgrade to v7.5.2 * Auto-update README * Update config.json * [fix] mariadb to postgres migration * Auto-update README * [fix] Update manifest requirements * Update manifest.json * Update config.json * upgrade config to upstream * Fix linter * Update _common.sh * v2 * Fix * Auto-update README * Fix * Auto-update README * Update upgrade * Fix * Cleaning * add apt * Auto-update README * cleaning * fix data path var * fix * Auto-update README * Update backup * add more apt * Update manifest.toml * Update tests.toml * Fix * Update _common.sh * Update upgrade * Update restore * Update remove * cleaning * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update manifest.toml * 7.7.1 * Update manifest.json * Auto-update README * Update config.json * Auto-update README * cleaning * Auto-update README * Update ADMIN.md * Update ADMIN_fr.md * fix * Delete check_process * 7.8.1 * Auto-update README * Auto-update README * Update manifest.toml * Auto-update README * fix migration from 7.3.0 * Update manifest.toml * fix migration from 7.3.0 * cleaning * Update manifest.toml * src * Update upgrade * Update upgrade * Update tests.toml * remove src * 7.9.1 * Auto-update README * Update config.json * Update doc/DESCRIPTION.md Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Auto-update README * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update upgrade * Update install * Update DESCRIPTION_fr.md * Auto-update README * Update _common.sh * Update manifest.toml * Update manifest.toml * Auto-update README * Update manifest.toml * Update upgrade * Update manifest.toml * Auto-update README * cleaning * Auto-update README * Update nginx.conf * Update manifest.toml * Auto-update README * cleaning * Update doc/ADMIN.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update doc/ADMIN_fr.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * 8.0.0 * Auto-update README * Update manifest.toml * Auto-update README * 8.1.0 * Auto-update README * Update upgrade * Update tests.toml * Update tests.toml * Update _common.sh * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml * DEBUG: see if other migrations pass (#430) * Update manifest.toml * Auto-update README * Revert "DEBUG: see if other migrations pass (#430)" This reverts commit 8532bd3ba2d60c77527a1b92f63e5c6b1dd3659b. * Update tests.toml * scripts: fix MySQL migration The PostgreSQL database has already been created, no need to create it manually. * scripts: improve DB migration comment * Update config.json * Update tests.toml * Fix v2 database deletion on error (#434) * scripts: improve comments * scripts: manually remove MariaDB database if needed --------- Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update manifest.toml * Auto-update README * Update manifest.toml * Auto-update README --------- Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: tituspijean <titus+yunohost@pijean.ovh> Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
2023-09-11 21:36:20 +02:00
chown -R $app:www-data "$data_dir"
2017-09-11 12:05:16 +02:00
#=================================================
Testing (#435) * scripts: reduce pgloader's prefetched columns This helps fixing stack overflow errors on large databases. * scripts: increase the migration timeout again It seems to be too short on some lesser-powered VMs. * Update manifest.json * Auto-update README * [autopatch] Fix Host and X-Forwarded-For header spoofing * conf: upgrade to Mattermost ESR 8.1.1 (#431) https://docs.mattermost.com/install/self-managed-changelog.html#release-v8-1-extended-support-release * Packaging format v2 (#406) * backup script for PostgreSQL (#376) Inspired from https://github.com/YunoHost-Apps/moodle_ynh/blob/master/scripts/backup * Adapt to PostgreSQL (#375) Question: in https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server, I see `BindsTo=postgresql.service` while in the original file here I find `Requires=mysql.service`. I don't know which one makes sense, so I keep the orinigal Yunohost version (Requires) * config.json for PostgreSQL (#374) Inspired from the original MySQL config.json and from Mattermost documentation https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server * Install with PostgreSQL (#373) I took inspiration from https://github.com/YunoHost-Apps/commento_ynh/blob/master/scripts/install * install postgresql * Reordering * reset config file * Update _common.sh * Update config.json * Fix * Migration (#382) * add migration * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Fix * Fix * Fix * Update install * Update upgrade * Fix * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update install * Fix * Fix * Fix * Update upgrade * Cleaning up * Update upgrade * Update _common.sh * Update check_process * Update _common.sh * Fix * Update mysql-to-pg.conf * Update upgrade * Update systemd.service * Cleaning * Update _common.sh * Fix * Update upgrade * Update _common.sh * Update upgrade * Update backup * Fix * Fix * Update upgrade * Update upgrade * Update systemd.service * Update _common.sh * Revert "Update _common.sh" This reverts commit d880150af94cc164c69802f4ae46d7e6529482f9. * Cleaning * Fix * Update check_process * Fix * Update _common.sh * Fix * Update _common.sh * Fix * Update manifest.json * Update install * Update _common.sh * Update upgrade * Fix * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Auto-update README * Update _common.sh * Upgrade to v7.4.0 * Auto-update README * Upgrade to v7.5.2 * Auto-update README * Update config.json * [fix] mariadb to postgres migration * Auto-update README * [fix] Update manifest requirements * Update manifest.json * Update config.json * upgrade config to upstream * Fix linter * Update _common.sh * v2 * Fix * Auto-update README * Fix * Auto-update README * Update upgrade * Fix * Cleaning * add apt * Auto-update README * cleaning * fix data path var * fix * Auto-update README * Update backup * add more apt * Update manifest.toml * Update tests.toml * Fix * Update _common.sh * Update upgrade * Update restore * Update remove * cleaning * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update manifest.toml * 7.7.1 * Update manifest.json * Auto-update README * Update config.json * Auto-update README * cleaning * Auto-update README * Update ADMIN.md * Update ADMIN_fr.md * fix * Delete check_process * 7.8.1 * Auto-update README * Auto-update README * Update manifest.toml * Auto-update README * fix migration from 7.3.0 * Update manifest.toml * fix migration from 7.3.0 * cleaning * Update manifest.toml * src * Update upgrade * Update upgrade * Update tests.toml * remove src * 7.9.1 * Auto-update README * Update config.json * Update doc/DESCRIPTION.md Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Auto-update README * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update upgrade * Update install * Update DESCRIPTION_fr.md * Auto-update README * Update _common.sh * Update manifest.toml * Update manifest.toml * Auto-update README * Update manifest.toml * Update upgrade * Update manifest.toml * Auto-update README * cleaning * Auto-update README * Update nginx.conf * Update manifest.toml * Auto-update README * cleaning * Update doc/ADMIN.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update doc/ADMIN_fr.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * 8.0.0 * Auto-update README * Update manifest.toml * Auto-update README * 8.1.0 * Auto-update README * Update upgrade * Update tests.toml * Update tests.toml * Update _common.sh * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml * DEBUG: see if other migrations pass (#430) * Update manifest.toml * Auto-update README * Revert "DEBUG: see if other migrations pass (#430)" This reverts commit 8532bd3ba2d60c77527a1b92f63e5c6b1dd3659b. * Update tests.toml * scripts: fix MySQL migration The PostgreSQL database has already been created, no need to create it manually. * scripts: improve DB migration comment * Update config.json * Update tests.toml * Fix v2 database deletion on error (#434) * scripts: improve comments * scripts: manually remove MariaDB database if needed --------- Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update manifest.toml * Auto-update README * Update manifest.toml * Auto-update README --------- Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: tituspijean <titus+yunohost@pijean.ovh> Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
2023-09-11 21:36:20 +02:00
# RESTORE SYSTEM CONFIGURATIONS
2017-09-11 12:05:16 +02:00
#=================================================
Testing (#435) * scripts: reduce pgloader's prefetched columns This helps fixing stack overflow errors on large databases. * scripts: increase the migration timeout again It seems to be too short on some lesser-powered VMs. * Update manifest.json * Auto-update README * [autopatch] Fix Host and X-Forwarded-For header spoofing * conf: upgrade to Mattermost ESR 8.1.1 (#431) https://docs.mattermost.com/install/self-managed-changelog.html#release-v8-1-extended-support-release * Packaging format v2 (#406) * backup script for PostgreSQL (#376) Inspired from https://github.com/YunoHost-Apps/moodle_ynh/blob/master/scripts/backup * Adapt to PostgreSQL (#375) Question: in https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server, I see `BindsTo=postgresql.service` while in the original file here I find `Requires=mysql.service`. I don't know which one makes sense, so I keep the orinigal Yunohost version (Requires) * config.json for PostgreSQL (#374) Inspired from the original MySQL config.json and from Mattermost documentation https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server * Install with PostgreSQL (#373) I took inspiration from https://github.com/YunoHost-Apps/commento_ynh/blob/master/scripts/install * install postgresql * Reordering * reset config file * Update _common.sh * Update config.json * Fix * Migration (#382) * add migration * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Fix * Fix * Fix * Update install * Update upgrade * Fix * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update install * Fix * Fix * Fix * Update upgrade * Cleaning up * Update upgrade * Update _common.sh * Update check_process * Update _common.sh * Fix * Update mysql-to-pg.conf * Update upgrade * Update systemd.service * Cleaning * Update _common.sh * Fix * Update upgrade * Update _common.sh * Update upgrade * Update backup * Fix * Fix * Update upgrade * Update upgrade * Update systemd.service * Update _common.sh * Revert "Update _common.sh" This reverts commit d880150af94cc164c69802f4ae46d7e6529482f9. * Cleaning * Fix * Update check_process * Fix * Update _common.sh * Fix * Update _common.sh * Fix * Update manifest.json * Update install * Update _common.sh * Update upgrade * Fix * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Auto-update README * Update _common.sh * Upgrade to v7.4.0 * Auto-update README * Upgrade to v7.5.2 * Auto-update README * Update config.json * [fix] mariadb to postgres migration * Auto-update README * [fix] Update manifest requirements * Update manifest.json * Update config.json * upgrade config to upstream * Fix linter * Update _common.sh * v2 * Fix * Auto-update README * Fix * Auto-update README * Update upgrade * Fix * Cleaning * add apt * Auto-update README * cleaning * fix data path var * fix * Auto-update README * Update backup * add more apt * Update manifest.toml * Update tests.toml * Fix * Update _common.sh * Update upgrade * Update restore * Update remove * cleaning * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update manifest.toml * 7.7.1 * Update manifest.json * Auto-update README * Update config.json * Auto-update README * cleaning * Auto-update README * Update ADMIN.md * Update ADMIN_fr.md * fix * Delete check_process * 7.8.1 * Auto-update README * Auto-update README * Update manifest.toml * Auto-update README * fix migration from 7.3.0 * Update manifest.toml * fix migration from 7.3.0 * cleaning * Update manifest.toml * src * Update upgrade * Update upgrade * Update tests.toml * remove src * 7.9.1 * Auto-update README * Update config.json * Update doc/DESCRIPTION.md Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Auto-update README * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update upgrade * Update install * Update DESCRIPTION_fr.md * Auto-update README * Update _common.sh * Update manifest.toml * Update manifest.toml * Auto-update README * Update manifest.toml * Update upgrade * Update manifest.toml * Auto-update README * cleaning * Auto-update README * Update nginx.conf * Update manifest.toml * Auto-update README * cleaning * Update doc/ADMIN.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update doc/ADMIN_fr.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * 8.0.0 * Auto-update README * Update manifest.toml * Auto-update README * 8.1.0 * Auto-update README * Update upgrade * Update tests.toml * Update tests.toml * Update _common.sh * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml * DEBUG: see if other migrations pass (#430) * Update manifest.toml * Auto-update README * Revert "DEBUG: see if other migrations pass (#430)" This reverts commit 8532bd3ba2d60c77527a1b92f63e5c6b1dd3659b. * Update tests.toml * scripts: fix MySQL migration The PostgreSQL database has already been created, no need to create it manually. * scripts: improve DB migration comment * Update config.json * Update tests.toml * Fix v2 database deletion on error (#434) * scripts: improve comments * scripts: manually remove MariaDB database if needed --------- Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update manifest.toml * Auto-update README * Update manifest.toml * Auto-update README --------- Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: tituspijean <titus+yunohost@pijean.ovh> Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
2023-09-11 21:36:20 +02:00
# RESTORE THE PHP-FPM CONFIGURATION
Merge testing into master (migration to PostgreSQL, change arm64 source, Matermost v7.5.2) (#411) * Upgrade to v7.3.0 * Auto-update README * Update config.json * Upgrade auto-updater (#407) * [autopatch] Upgrade auto-updater * Auto-update README --------- Co-authored-by: tituspijean <titus@pijean.ovh> * Transition to PostgreSQL (#377) * backup script for PostgreSQL (#376) Inspired from https://github.com/YunoHost-Apps/moodle_ynh/blob/master/scripts/backup * Adapt to PostgreSQL (#375) Question: in https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server, I see `BindsTo=postgresql.service` while in the original file here I find `Requires=mysql.service`. I don't know which one makes sense, so I keep the orinigal Yunohost version (Requires) * config.json for PostgreSQL (#374) Inspired from the original MySQL config.json and from Mattermost documentation https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server * Install with PostgreSQL (#373) I took inspiration from https://github.com/YunoHost-Apps/commento_ynh/blob/master/scripts/install * install postgresql * Reordering * reset config file * Update _common.sh * Update config.json * Fix * Migration (#382) * add migration * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Fix * Fix * Fix * Update install * Update upgrade * Fix * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update install * Fix * Fix * Fix * Update upgrade * Cleaning up * Update upgrade * Update _common.sh * Update check_process * Update _common.sh * Fix * Update mysql-to-pg.conf * Update upgrade * Update systemd.service * Cleaning * Update _common.sh * Fix * Update upgrade * Update _common.sh * Update upgrade * Update backup * Fix * Fix * Update upgrade * Update upgrade * Update systemd.service * Update _common.sh * Revert "Update _common.sh" This reverts commit d880150af94cc164c69802f4ae46d7e6529482f9. * Cleaning * Fix * Update check_process * Fix * Update _common.sh * Fix * Update _common.sh * Fix * Update manifest.json * Update install * Update _common.sh * Update upgrade * Fix * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Auto-update README * Update _common.sh * Upgrade to v7.4.0 * Auto-update README * Upgrade to v7.5.2 * Auto-update README * Update config.json * [fix] mariadb to postgres migration * Auto-update README * [fix] Update manifest requirements * Update manifest.json * Update config.json * upgrade config to upstream * Fix linter * Update _common.sh * Fix typo * Auto-update README * Update upgrade * Update scripts/upgrade Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * [enh] Indentation * Apply suggestions from code review Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * [enh] COmments * Increase timeout for table creation Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * test upgrade from 7.2.0 * Auto-update README * fix db_name in case of multi_instance * Fix 7.3.0 migration * delete only the problematic value in db_migrations * Added explanation for migration management from 7.3.0 * mariadb-to-pg: drop stray columns These should have been removed in a previous migration, but weren't. See https://github.com/mattermost/mattermost-server/issues/18351#issuecomment-1325648058 * mariadb-to-pg: increase mattermost timeout On a small VPS the 2 mn timeout is almost reached. Increase it to 3 mn. --------- Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: ljf (zamentur) <zamentur@users.noreply.github.com> Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: Kay0u <pierre@kayou.io> * Change arm64 source (#409) * add entreprise for arm64, use the official build for arm64 * Auto-update README * update auto-updater script --------- Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> * delete the psql db if the migration fails * Drop all Focalbard tables if mattermost is in 7.3.0 --------- Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: tituspijean <titus@pijean.ovh> Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: ljf (zamentur) <zamentur@users.noreply.github.com> Co-authored-by: Kay0u <pierre@kayou.io>
2023-03-14 11:16:39 +01:00
#=================================================
Testing (#435) * scripts: reduce pgloader's prefetched columns This helps fixing stack overflow errors on large databases. * scripts: increase the migration timeout again It seems to be too short on some lesser-powered VMs. * Update manifest.json * Auto-update README * [autopatch] Fix Host and X-Forwarded-For header spoofing * conf: upgrade to Mattermost ESR 8.1.1 (#431) https://docs.mattermost.com/install/self-managed-changelog.html#release-v8-1-extended-support-release * Packaging format v2 (#406) * backup script for PostgreSQL (#376) Inspired from https://github.com/YunoHost-Apps/moodle_ynh/blob/master/scripts/backup * Adapt to PostgreSQL (#375) Question: in https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server, I see `BindsTo=postgresql.service` while in the original file here I find `Requires=mysql.service`. I don't know which one makes sense, so I keep the orinigal Yunohost version (Requires) * config.json for PostgreSQL (#374) Inspired from the original MySQL config.json and from Mattermost documentation https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server * Install with PostgreSQL (#373) I took inspiration from https://github.com/YunoHost-Apps/commento_ynh/blob/master/scripts/install * install postgresql * Reordering * reset config file * Update _common.sh * Update config.json * Fix * Migration (#382) * add migration * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Fix * Fix * Fix * Update install * Update upgrade * Fix * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update install * Fix * Fix * Fix * Update upgrade * Cleaning up * Update upgrade * Update _common.sh * Update check_process * Update _common.sh * Fix * Update mysql-to-pg.conf * Update upgrade * Update systemd.service * Cleaning * Update _common.sh * Fix * Update upgrade * Update _common.sh * Update upgrade * Update backup * Fix * Fix * Update upgrade * Update upgrade * Update systemd.service * Update _common.sh * Revert "Update _common.sh" This reverts commit d880150af94cc164c69802f4ae46d7e6529482f9. * Cleaning * Fix * Update check_process * Fix * Update _common.sh * Fix * Update _common.sh * Fix * Update manifest.json * Update install * Update _common.sh * Update upgrade * Fix * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Auto-update README * Update _common.sh * Upgrade to v7.4.0 * Auto-update README * Upgrade to v7.5.2 * Auto-update README * Update config.json * [fix] mariadb to postgres migration * Auto-update README * [fix] Update manifest requirements * Update manifest.json * Update config.json * upgrade config to upstream * Fix linter * Update _common.sh * v2 * Fix * Auto-update README * Fix * Auto-update README * Update upgrade * Fix * Cleaning * add apt * Auto-update README * cleaning * fix data path var * fix * Auto-update README * Update backup * add more apt * Update manifest.toml * Update tests.toml * Fix * Update _common.sh * Update upgrade * Update restore * Update remove * cleaning * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update manifest.toml * 7.7.1 * Update manifest.json * Auto-update README * Update config.json * Auto-update README * cleaning * Auto-update README * Update ADMIN.md * Update ADMIN_fr.md * fix * Delete check_process * 7.8.1 * Auto-update README * Auto-update README * Update manifest.toml * Auto-update README * fix migration from 7.3.0 * Update manifest.toml * fix migration from 7.3.0 * cleaning * Update manifest.toml * src * Update upgrade * Update upgrade * Update tests.toml * remove src * 7.9.1 * Auto-update README * Update config.json * Update doc/DESCRIPTION.md Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Auto-update README * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update upgrade * Update install * Update DESCRIPTION_fr.md * Auto-update README * Update _common.sh * Update manifest.toml * Update manifest.toml * Auto-update README * Update manifest.toml * Update upgrade * Update manifest.toml * Auto-update README * cleaning * Auto-update README * Update nginx.conf * Update manifest.toml * Auto-update README * cleaning * Update doc/ADMIN.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update doc/ADMIN_fr.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * 8.0.0 * Auto-update README * Update manifest.toml * Auto-update README * 8.1.0 * Auto-update README * Update upgrade * Update tests.toml * Update tests.toml * Update _common.sh * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml * DEBUG: see if other migrations pass (#430) * Update manifest.toml * Auto-update README * Revert "DEBUG: see if other migrations pass (#430)" This reverts commit 8532bd3ba2d60c77527a1b92f63e5c6b1dd3659b. * Update tests.toml * scripts: fix MySQL migration The PostgreSQL database has already been created, no need to create it manually. * scripts: improve DB migration comment * Update config.json * Update tests.toml * Fix v2 database deletion on error (#434) * scripts: improve comments * scripts: manually remove MariaDB database if needed --------- Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update manifest.toml * Auto-update README * Update manifest.toml * Auto-update README --------- Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: tituspijean <titus+yunohost@pijean.ovh> Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
2023-09-11 21:36:20 +02:00
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
Merge testing into master (migration to PostgreSQL, change arm64 source, Matermost v7.5.2) (#411) * Upgrade to v7.3.0 * Auto-update README * Update config.json * Upgrade auto-updater (#407) * [autopatch] Upgrade auto-updater * Auto-update README --------- Co-authored-by: tituspijean <titus@pijean.ovh> * Transition to PostgreSQL (#377) * backup script for PostgreSQL (#376) Inspired from https://github.com/YunoHost-Apps/moodle_ynh/blob/master/scripts/backup * Adapt to PostgreSQL (#375) Question: in https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server, I see `BindsTo=postgresql.service` while in the original file here I find `Requires=mysql.service`. I don't know which one makes sense, so I keep the orinigal Yunohost version (Requires) * config.json for PostgreSQL (#374) Inspired from the original MySQL config.json and from Mattermost documentation https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server * Install with PostgreSQL (#373) I took inspiration from https://github.com/YunoHost-Apps/commento_ynh/blob/master/scripts/install * install postgresql * Reordering * reset config file * Update _common.sh * Update config.json * Fix * Migration (#382) * add migration * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Fix * Fix * Fix * Update install * Update upgrade * Fix * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update install * Fix * Fix * Fix * Update upgrade * Cleaning up * Update upgrade * Update _common.sh * Update check_process * Update _common.sh * Fix * Update mysql-to-pg.conf * Update upgrade * Update systemd.service * Cleaning * Update _common.sh * Fix * Update upgrade * Update _common.sh * Update upgrade * Update backup * Fix * Fix * Update upgrade * Update upgrade * Update systemd.service * Update _common.sh * Revert "Update _common.sh" This reverts commit d880150af94cc164c69802f4ae46d7e6529482f9. * Cleaning * Fix * Update check_process * Fix * Update _common.sh * Fix * Update _common.sh * Fix * Update manifest.json * Update install * Update _common.sh * Update upgrade * Fix * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Auto-update README * Update _common.sh * Upgrade to v7.4.0 * Auto-update README * Upgrade to v7.5.2 * Auto-update README * Update config.json * [fix] mariadb to postgres migration * Auto-update README * [fix] Update manifest requirements * Update manifest.json * Update config.json * upgrade config to upstream * Fix linter * Update _common.sh * Fix typo * Auto-update README * Update upgrade * Update scripts/upgrade Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * [enh] Indentation * Apply suggestions from code review Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * [enh] COmments * Increase timeout for table creation Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * test upgrade from 7.2.0 * Auto-update README * fix db_name in case of multi_instance * Fix 7.3.0 migration * delete only the problematic value in db_migrations * Added explanation for migration management from 7.3.0 * mariadb-to-pg: drop stray columns These should have been removed in a previous migration, but weren't. See https://github.com/mattermost/mattermost-server/issues/18351#issuecomment-1325648058 * mariadb-to-pg: increase mattermost timeout On a small VPS the 2 mn timeout is almost reached. Increase it to 3 mn. --------- Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: ljf (zamentur) <zamentur@users.noreply.github.com> Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: Kay0u <pierre@kayou.io> * Change arm64 source (#409) * add entreprise for arm64, use the official build for arm64 * Auto-update README * update auto-updater script --------- Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> * delete the psql db if the migration fails * Drop all Focalbard tables if mattermost is in 7.3.0 --------- Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: tituspijean <titus@pijean.ovh> Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: ljf (zamentur) <zamentur@users.noreply.github.com> Co-authored-by: Kay0u <pierre@kayou.io>
2023-03-14 11:16:39 +01:00
Testing (#435) * scripts: reduce pgloader's prefetched columns This helps fixing stack overflow errors on large databases. * scripts: increase the migration timeout again It seems to be too short on some lesser-powered VMs. * Update manifest.json * Auto-update README * [autopatch] Fix Host and X-Forwarded-For header spoofing * conf: upgrade to Mattermost ESR 8.1.1 (#431) https://docs.mattermost.com/install/self-managed-changelog.html#release-v8-1-extended-support-release * Packaging format v2 (#406) * backup script for PostgreSQL (#376) Inspired from https://github.com/YunoHost-Apps/moodle_ynh/blob/master/scripts/backup * Adapt to PostgreSQL (#375) Question: in https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server, I see `BindsTo=postgresql.service` while in the original file here I find `Requires=mysql.service`. I don't know which one makes sense, so I keep the orinigal Yunohost version (Requires) * config.json for PostgreSQL (#374) Inspired from the original MySQL config.json and from Mattermost documentation https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server * Install with PostgreSQL (#373) I took inspiration from https://github.com/YunoHost-Apps/commento_ynh/blob/master/scripts/install * install postgresql * Reordering * reset config file * Update _common.sh * Update config.json * Fix * Migration (#382) * add migration * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Fix * Fix * Fix * Update install * Update upgrade * Fix * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update install * Fix * Fix * Fix * Update upgrade * Cleaning up * Update upgrade * Update _common.sh * Update check_process * Update _common.sh * Fix * Update mysql-to-pg.conf * Update upgrade * Update systemd.service * Cleaning * Update _common.sh * Fix * Update upgrade * Update _common.sh * Update upgrade * Update backup * Fix * Fix * Update upgrade * Update upgrade * Update systemd.service * Update _common.sh * Revert "Update _common.sh" This reverts commit d880150af94cc164c69802f4ae46d7e6529482f9. * Cleaning * Fix * Update check_process * Fix * Update _common.sh * Fix * Update _common.sh * Fix * Update manifest.json * Update install * Update _common.sh * Update upgrade * Fix * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Auto-update README * Update _common.sh * Upgrade to v7.4.0 * Auto-update README * Upgrade to v7.5.2 * Auto-update README * Update config.json * [fix] mariadb to postgres migration * Auto-update README * [fix] Update manifest requirements * Update manifest.json * Update config.json * upgrade config to upstream * Fix linter * Update _common.sh * v2 * Fix * Auto-update README * Fix * Auto-update README * Update upgrade * Fix * Cleaning * add apt * Auto-update README * cleaning * fix data path var * fix * Auto-update README * Update backup * add more apt * Update manifest.toml * Update tests.toml * Fix * Update _common.sh * Update upgrade * Update restore * Update remove * cleaning * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update manifest.toml * 7.7.1 * Update manifest.json * Auto-update README * Update config.json * Auto-update README * cleaning * Auto-update README * Update ADMIN.md * Update ADMIN_fr.md * fix * Delete check_process * 7.8.1 * Auto-update README * Auto-update README * Update manifest.toml * Auto-update README * fix migration from 7.3.0 * Update manifest.toml * fix migration from 7.3.0 * cleaning * Update manifest.toml * src * Update upgrade * Update upgrade * Update tests.toml * remove src * 7.9.1 * Auto-update README * Update config.json * Update doc/DESCRIPTION.md Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Auto-update README * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update upgrade * Update install * Update DESCRIPTION_fr.md * Auto-update README * Update _common.sh * Update manifest.toml * Update manifest.toml * Auto-update README * Update manifest.toml * Update upgrade * Update manifest.toml * Auto-update README * cleaning * Auto-update README * Update nginx.conf * Update manifest.toml * Auto-update README * cleaning * Update doc/ADMIN.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update doc/ADMIN_fr.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * 8.0.0 * Auto-update README * Update manifest.toml * Auto-update README * 8.1.0 * Auto-update README * Update upgrade * Update tests.toml * Update tests.toml * Update _common.sh * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml * DEBUG: see if other migrations pass (#430) * Update manifest.toml * Auto-update README * Revert "DEBUG: see if other migrations pass (#430)" This reverts commit 8532bd3ba2d60c77527a1b92f63e5c6b1dd3659b. * Update tests.toml * scripts: fix MySQL migration The PostgreSQL database has already been created, no need to create it manually. * scripts: improve DB migration comment * Update config.json * Update tests.toml * Fix v2 database deletion on error (#434) * scripts: improve comments * scripts: manually remove MariaDB database if needed --------- Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update manifest.toml * Auto-update README * Update manifest.toml * Auto-update README --------- Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: tituspijean <titus+yunohost@pijean.ovh> Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
2023-09-11 21:36:20 +02:00
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
2017-09-11 12:05:16 +02:00
Testing (#435) * scripts: reduce pgloader's prefetched columns This helps fixing stack overflow errors on large databases. * scripts: increase the migration timeout again It seems to be too short on some lesser-powered VMs. * Update manifest.json * Auto-update README * [autopatch] Fix Host and X-Forwarded-For header spoofing * conf: upgrade to Mattermost ESR 8.1.1 (#431) https://docs.mattermost.com/install/self-managed-changelog.html#release-v8-1-extended-support-release * Packaging format v2 (#406) * backup script for PostgreSQL (#376) Inspired from https://github.com/YunoHost-Apps/moodle_ynh/blob/master/scripts/backup * Adapt to PostgreSQL (#375) Question: in https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server, I see `BindsTo=postgresql.service` while in the original file here I find `Requires=mysql.service`. I don't know which one makes sense, so I keep the orinigal Yunohost version (Requires) * config.json for PostgreSQL (#374) Inspired from the original MySQL config.json and from Mattermost documentation https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server * Install with PostgreSQL (#373) I took inspiration from https://github.com/YunoHost-Apps/commento_ynh/blob/master/scripts/install * install postgresql * Reordering * reset config file * Update _common.sh * Update config.json * Fix * Migration (#382) * add migration * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Fix * Fix * Fix * Update install * Update upgrade * Fix * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update install * Fix * Fix * Fix * Update upgrade * Cleaning up * Update upgrade * Update _common.sh * Update check_process * Update _common.sh * Fix * Update mysql-to-pg.conf * Update upgrade * Update systemd.service * Cleaning * Update _common.sh * Fix * Update upgrade * Update _common.sh * Update upgrade * Update backup * Fix * Fix * Update upgrade * Update upgrade * Update systemd.service * Update _common.sh * Revert "Update _common.sh" This reverts commit d880150af94cc164c69802f4ae46d7e6529482f9. * Cleaning * Fix * Update check_process * Fix * Update _common.sh * Fix * Update _common.sh * Fix * Update manifest.json * Update install * Update _common.sh * Update upgrade * Fix * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Auto-update README * Update _common.sh * Upgrade to v7.4.0 * Auto-update README * Upgrade to v7.5.2 * Auto-update README * Update config.json * [fix] mariadb to postgres migration * Auto-update README * [fix] Update manifest requirements * Update manifest.json * Update config.json * upgrade config to upstream * Fix linter * Update _common.sh * v2 * Fix * Auto-update README * Fix * Auto-update README * Update upgrade * Fix * Cleaning * add apt * Auto-update README * cleaning * fix data path var * fix * Auto-update README * Update backup * add more apt * Update manifest.toml * Update tests.toml * Fix * Update _common.sh * Update upgrade * Update restore * Update remove * cleaning * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update manifest.toml * 7.7.1 * Update manifest.json * Auto-update README * Update config.json * Auto-update README * cleaning * Auto-update README * Update ADMIN.md * Update ADMIN_fr.md * fix * Delete check_process * 7.8.1 * Auto-update README * Auto-update README * Update manifest.toml * Auto-update README * fix migration from 7.3.0 * Update manifest.toml * fix migration from 7.3.0 * cleaning * Update manifest.toml * src * Update upgrade * Update upgrade * Update tests.toml * remove src * 7.9.1 * Auto-update README * Update config.json * Update doc/DESCRIPTION.md Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Auto-update README * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update upgrade * Update install * Update DESCRIPTION_fr.md * Auto-update README * Update _common.sh * Update manifest.toml * Update manifest.toml * Auto-update README * Update manifest.toml * Update upgrade * Update manifest.toml * Auto-update README * cleaning * Auto-update README * Update nginx.conf * Update manifest.toml * Auto-update README * cleaning * Update doc/ADMIN.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update doc/ADMIN_fr.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * 8.0.0 * Auto-update README * Update manifest.toml * Auto-update README * 8.1.0 * Auto-update README * Update upgrade * Update tests.toml * Update tests.toml * Update _common.sh * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml * DEBUG: see if other migrations pass (#430) * Update manifest.toml * Auto-update README * Revert "DEBUG: see if other migrations pass (#430)" This reverts commit 8532bd3ba2d60c77527a1b92f63e5c6b1dd3659b. * Update tests.toml * scripts: fix MySQL migration The PostgreSQL database has already been created, no need to create it manually. * scripts: improve DB migration comment * Update config.json * Update tests.toml * Fix v2 database deletion on error (#434) * scripts: improve comments * scripts: manually remove MariaDB database if needed --------- Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update manifest.toml * Auto-update README * Update manifest.toml * Auto-update README --------- Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: tituspijean <titus+yunohost@pijean.ovh> Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
2023-09-11 21:36:20 +02:00
ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
2017-09-11 12:05:16 +02:00
2021-01-11 23:46:48 +01:00
logs_path="/var/log/$app"
mkdir -p $logs_path
chown -R $app: $logs_path
2017-10-10 12:47:33 +02:00
ynh_restore_file "/etc/systemd/system/$app.service"
2021-01-11 23:46:48 +01:00
systemctl enable $app.service --quiet
2017-09-11 12:05:16 +02:00
2021-01-11 23:46:48 +01:00
yunohost service add $app --description="Collaboration platform built for developers" --log="/var/log/$app/$app.log"
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
2017-09-11 12:05:16 +02:00
#=================================================
# GENERIC FINALIZATION
#=================================================
Testing (#435) * scripts: reduce pgloader's prefetched columns This helps fixing stack overflow errors on large databases. * scripts: increase the migration timeout again It seems to be too short on some lesser-powered VMs. * Update manifest.json * Auto-update README * [autopatch] Fix Host and X-Forwarded-For header spoofing * conf: upgrade to Mattermost ESR 8.1.1 (#431) https://docs.mattermost.com/install/self-managed-changelog.html#release-v8-1-extended-support-release * Packaging format v2 (#406) * backup script for PostgreSQL (#376) Inspired from https://github.com/YunoHost-Apps/moodle_ynh/blob/master/scripts/backup * Adapt to PostgreSQL (#375) Question: in https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server, I see `BindsTo=postgresql.service` while in the original file here I find `Requires=mysql.service`. I don't know which one makes sense, so I keep the orinigal Yunohost version (Requires) * config.json for PostgreSQL (#374) Inspired from the original MySQL config.json and from Mattermost documentation https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server * Install with PostgreSQL (#373) I took inspiration from https://github.com/YunoHost-Apps/commento_ynh/blob/master/scripts/install * install postgresql * Reordering * reset config file * Update _common.sh * Update config.json * Fix * Migration (#382) * add migration * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Fix * Fix * Fix * Update install * Update upgrade * Fix * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update install * Fix * Fix * Fix * Update upgrade * Cleaning up * Update upgrade * Update _common.sh * Update check_process * Update _common.sh * Fix * Update mysql-to-pg.conf * Update upgrade * Update systemd.service * Cleaning * Update _common.sh * Fix * Update upgrade * Update _common.sh * Update upgrade * Update backup * Fix * Fix * Update upgrade * Update upgrade * Update systemd.service * Update _common.sh * Revert "Update _common.sh" This reverts commit d880150af94cc164c69802f4ae46d7e6529482f9. * Cleaning * Fix * Update check_process * Fix * Update _common.sh * Fix * Update _common.sh * Fix * Update manifest.json * Update install * Update _common.sh * Update upgrade * Fix * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Auto-update README * Update _common.sh * Upgrade to v7.4.0 * Auto-update README * Upgrade to v7.5.2 * Auto-update README * Update config.json * [fix] mariadb to postgres migration * Auto-update README * [fix] Update manifest requirements * Update manifest.json * Update config.json * upgrade config to upstream * Fix linter * Update _common.sh * v2 * Fix * Auto-update README * Fix * Auto-update README * Update upgrade * Fix * Cleaning * add apt * Auto-update README * cleaning * fix data path var * fix * Auto-update README * Update backup * add more apt * Update manifest.toml * Update tests.toml * Fix * Update _common.sh * Update upgrade * Update restore * Update remove * cleaning * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update manifest.toml * 7.7.1 * Update manifest.json * Auto-update README * Update config.json * Auto-update README * cleaning * Auto-update README * Update ADMIN.md * Update ADMIN_fr.md * fix * Delete check_process * 7.8.1 * Auto-update README * Auto-update README * Update manifest.toml * Auto-update README * fix migration from 7.3.0 * Update manifest.toml * fix migration from 7.3.0 * cleaning * Update manifest.toml * src * Update upgrade * Update upgrade * Update tests.toml * remove src * 7.9.1 * Auto-update README * Update config.json * Update doc/DESCRIPTION.md Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Auto-update README * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update upgrade * Update install * Update DESCRIPTION_fr.md * Auto-update README * Update _common.sh * Update manifest.toml * Update manifest.toml * Auto-update README * Update manifest.toml * Update upgrade * Update manifest.toml * Auto-update README * cleaning * Auto-update README * Update nginx.conf * Update manifest.toml * Auto-update README * cleaning * Update doc/ADMIN.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update doc/ADMIN_fr.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * 8.0.0 * Auto-update README * Update manifest.toml * Auto-update README * 8.1.0 * Auto-update README * Update upgrade * Update tests.toml * Update tests.toml * Update _common.sh * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml * DEBUG: see if other migrations pass (#430) * Update manifest.toml * Auto-update README * Revert "DEBUG: see if other migrations pass (#430)" This reverts commit 8532bd3ba2d60c77527a1b92f63e5c6b1dd3659b. * Update tests.toml * scripts: fix MySQL migration The PostgreSQL database has already been created, no need to create it manually. * scripts: improve DB migration comment * Update config.json * Update tests.toml * Fix v2 database deletion on error (#434) * scripts: improve comments * scripts: manually remove MariaDB database if needed --------- Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update manifest.toml * Auto-update README * Update manifest.toml * Auto-update README --------- Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: tituspijean <titus+yunohost@pijean.ovh> Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
2023-09-11 21:36:20 +02:00
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
2017-09-11 12:05:16 +02:00
#=================================================
Testing (#435) * scripts: reduce pgloader's prefetched columns This helps fixing stack overflow errors on large databases. * scripts: increase the migration timeout again It seems to be too short on some lesser-powered VMs. * Update manifest.json * Auto-update README * [autopatch] Fix Host and X-Forwarded-For header spoofing * conf: upgrade to Mattermost ESR 8.1.1 (#431) https://docs.mattermost.com/install/self-managed-changelog.html#release-v8-1-extended-support-release * Packaging format v2 (#406) * backup script for PostgreSQL (#376) Inspired from https://github.com/YunoHost-Apps/moodle_ynh/blob/master/scripts/backup * Adapt to PostgreSQL (#375) Question: in https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server, I see `BindsTo=postgresql.service` while in the original file here I find `Requires=mysql.service`. I don't know which one makes sense, so I keep the orinigal Yunohost version (Requires) * config.json for PostgreSQL (#374) Inspired from the original MySQL config.json and from Mattermost documentation https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server * Install with PostgreSQL (#373) I took inspiration from https://github.com/YunoHost-Apps/commento_ynh/blob/master/scripts/install * install postgresql * Reordering * reset config file * Update _common.sh * Update config.json * Fix * Migration (#382) * add migration * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Fix * Fix * Fix * Update install * Update upgrade * Fix * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update install * Fix * Fix * Fix * Update upgrade * Cleaning up * Update upgrade * Update _common.sh * Update check_process * Update _common.sh * Fix * Update mysql-to-pg.conf * Update upgrade * Update systemd.service * Cleaning * Update _common.sh * Fix * Update upgrade * Update _common.sh * Update upgrade * Update backup * Fix * Fix * Update upgrade * Update upgrade * Update systemd.service * Update _common.sh * Revert "Update _common.sh" This reverts commit d880150af94cc164c69802f4ae46d7e6529482f9. * Cleaning * Fix * Update check_process * Fix * Update _common.sh * Fix * Update _common.sh * Fix * Update manifest.json * Update install * Update _common.sh * Update upgrade * Fix * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Update _common.sh * Auto-update README * Update _common.sh * Upgrade to v7.4.0 * Auto-update README * Upgrade to v7.5.2 * Auto-update README * Update config.json * [fix] mariadb to postgres migration * Auto-update README * [fix] Update manifest requirements * Update manifest.json * Update config.json * upgrade config to upstream * Fix linter * Update _common.sh * v2 * Fix * Auto-update README * Fix * Auto-update README * Update upgrade * Fix * Cleaning * add apt * Auto-update README * cleaning * fix data path var * fix * Auto-update README * Update backup * add more apt * Update manifest.toml * Update tests.toml * Fix * Update _common.sh * Update upgrade * Update restore * Update remove * cleaning * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update manifest.toml * 7.7.1 * Update manifest.json * Auto-update README * Update config.json * Auto-update README * cleaning * Auto-update README * Update ADMIN.md * Update ADMIN_fr.md * fix * Delete check_process * 7.8.1 * Auto-update README * Auto-update README * Update manifest.toml * Auto-update README * fix migration from 7.3.0 * Update manifest.toml * fix migration from 7.3.0 * cleaning * Update manifest.toml * src * Update upgrade * Update upgrade * Update tests.toml * remove src * 7.9.1 * Auto-update README * Update config.json * Update doc/DESCRIPTION.md Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Auto-update README * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update upgrade * Update install * Update DESCRIPTION_fr.md * Auto-update README * Update _common.sh * Update manifest.toml * Update manifest.toml * Auto-update README * Update manifest.toml * Update upgrade * Update manifest.toml * Auto-update README * cleaning * Auto-update README * Update nginx.conf * Update manifest.toml * Auto-update README * cleaning * Update doc/ADMIN.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update doc/ADMIN_fr.md Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * 8.0.0 * Auto-update README * Update manifest.toml * Auto-update README * 8.1.0 * Auto-update README * Update upgrade * Update tests.toml * Update tests.toml * Update _common.sh * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update tests.toml Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> * Update manifest.toml * DEBUG: see if other migrations pass (#430) * Update manifest.toml * Auto-update README * Revert "DEBUG: see if other migrations pass (#430)" This reverts commit 8532bd3ba2d60c77527a1b92f63e5c6b1dd3659b. * Update tests.toml * scripts: fix MySQL migration The PostgreSQL database has already been created, no need to create it manually. * scripts: improve DB migration comment * Update config.json * Update tests.toml * Fix v2 database deletion on error (#434) * scripts: improve comments * scripts: manually remove MariaDB database if needed --------- Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update manifest.toml * Auto-update README * Update manifest.toml * Auto-update README --------- Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: tituspijean <titus+yunohost@pijean.ovh> Co-authored-by: biva <biva@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: ljf <ljf+git@grimaud.me> Co-authored-by: Kay0u <pierre@kayou.io> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
2023-09-11 21:36:20 +02:00
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
# Start a systemd service
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Started Mattermost"
2017-09-11 12:05:16 +02:00
2021-01-11 23:46:48 +01:00
ynh_systemd_action --service_name=nginx --action=reload
2017-10-12 08:08:53 +02:00
#=================================================
2021-01-11 23:46:48 +01:00
# END OF SCRIPT
2017-10-12 08:08:53 +02:00
#=================================================
2021-01-11 23:46:48 +01:00
ynh_script_progression --message="Restoration completed for $app" --last