From f47c560c2df5ce37640180a0fd65e89761d5ac09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 25 May 2022 18:35:13 +0200 Subject: [PATCH 1/2] Testing (#69) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix * Update _common.sh * Fix * Update install * Fix * fix * Fix * fix * Update README.md * Update install * Fix * Fix * Fix * Fix * Fix * Update nginx.conf * Update manifest.json * Fix * Fix * Update .env.example * Update .env.example * Fix * Fix * Update php-fpm.conf * Update .env.example * Update README.md * Update upgrade * Update change_url * Fix * Update upgrade * Fix * Update upgrade * Fix * Fix * Update upgrade * Update check_process * Fix * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Fix multi install * Update php-fpm.conf * Fix maintenance mail * Update manifest.json * upgrade to 0.31.5 (#10) * 0.31.6 (#13) * Upgrade to version 0.31.6 * Upgrade to version 0.31.7 (#15) * Upgrade to 21.04 (#18) * Upgrade to version 21.02 * Remove multi instance * Update check_process * 21.04.1 (#21) * 21.04.2 * Upgrade to upstream (#24) * Fix link * upgrade to version 21.04.4 (#26) * upgrade to version 21.04.4 * Upgrade requirements * [autopatch] Update issue and PR templates (#28) * Testing * upgrade to version 21.04.4 * [autopatch] Update issue and PR templates Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: Yunohost-Bot <> * 21.04.5 (#29) * Upgrade to version 21.4.6 * Add templates * Auto-update README * Update check_process * Auto-update README * 21.05 (#31) * 21.05 * upgrade * Auto-update README * bump * Auto-update README * fix * Update _common.sh * Update install * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update check_process * Update upgrade (#33) * 21.05.3 (#34) * 21.05.3 * Patch (#37) * PHP8 * 21.05.4 * Auto-update README * Update restore * 21.08 (#39) * 21.08 * Fix * Auto-update README * 21.08.2 * Auto-update README * Update manifest.json * Update upgrade * 21.11 (#41) * 21.11.2 * Update _common.sh * Update manifest.json * Fix * Fix * Update _common.sh * Update upgrade * Update upgrade * 21.11.2 * Auto-update README * Update upgrade * Update upgrade * Fix * Update _common.sh * Update manifest.json * Auto-update README * Update app.src * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update upgrade * Update .env.example * Update upgrade * Update change_url * Fix * Update check_process * Update check_process * Update change_url * Update change_url * Update change_url * Update change_url * Update change_url * Update _common.sh * Update change_url * Update change_url * Update install * Update install * Update change_url * Update change_url * Update change_url * Update change_url * Update change_url * Update change_url * Update change_url * Update change_url * Update change_url * Revert "Update change_url" This reverts commit faec2bb235c5c944f78d83b19a2aa38e8c070d53. * Update change_url * Update change_url * Update change_url * Update change_url * Fix url (#45) * Update change_url * Update upgrade * Fix url 2 (#46) * fix * Update change_url * Update upgrade * Update change_url * Add timezone * Fix url 2 (#47) * Update change_url * Update install * Update change_url * Admin ldap (#51) Define admin during install Add LDAP Add config panel * Update check_process * Update config_panel.toml * Create updater.sh * Remove password * Auto-update README * Fix * Auto-update README * Update manifest.json * Auto-update README * 21.12.5 * Auto-update README * 22.02 (#55) * 22.02 * Auto-update README * Auto-update README Co-authored-by: Yunohost-Bot <> * 22.02.1 * Auto-update README * Fix url (#48) * Update change_url * Add fr * Auto-update README * Update .env.example * Upgrade composer * Update upgrade * Update upgrade * Fix * Update install * 22.02.2 * Auto-update README * Fix file size upload * 22.02.3 * Auto-update README * Auto-update README * Update .env.example.complete * Update .env.example * Fix * Auto-update README * Multi instance (#61) * multi_instance: true * test multi_instance * fix a typo? (weight) * Update install * Update upgrade * Update manifest.json * Auto-update README * Update restore * Update check_process * 22.03 * Auto-update README * Fix * Auto-update README * v22.04.1 * Auto-update README * v22.04.2 * Auto-update README * keep config * Update _common.sh * Update updater.sh * Create updater.yml (#68) * Update updater.sh * Update manifest.json * Auto-update README * Update .env.example * Auto-update README * Queue worker process (#70) * Add worker * regenerate config file * Set log_path to systemd * Update change_url Co-authored-by: tituspijean Co-authored-by: YunoHost Bot Co-authored-by: Yunohost-Bot <> Co-authored-by: OniriCorpe Co-authored-by: yunohost-bot --- .github/workflows/updater.sh | 45 +++++++------------------------ .github/workflows/updater.yml | 50 +++++++++++++++++++++++++++++++++++ README.md | 23 ++++++++-------- README_fr.md | 29 +++++++++++--------- conf/.env.example | 4 +-- conf/systemd.service | 11 ++++++++ manifest.json | 2 +- scripts/_common.sh | 2 +- scripts/backup | 6 +++++ scripts/change_url | 18 +++++++++++++ scripts/install | 23 ++++++++++++++++ scripts/remove | 21 +++++++++++++++ scripts/restore | 22 +++++++++++++++ scripts/upgrade | 22 +++++++++++++++ 14 files changed, 215 insertions(+), 63 deletions(-) create mode 100644 .github/workflows/updater.yml create mode 100644 conf/systemd.service diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index c4d53fc..3f4fd78 100755 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -10,7 +10,7 @@ # automatic actions when a new upstream release is detected. # Remove this exit command when you are ready to run this Action -exit 1 +#exit 1 #================================================= # FETCHING LATEST RELEASE AND ITS ASSETS @@ -21,7 +21,8 @@ current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]') # Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1) -assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'")) +#assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'")) +asset_url=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select(.tag_name=="'$version'").tarball_url') # Later down the script, we assume the version has only digits and dots # Sometimes the release name starts with a "v", so let's filter it out. @@ -48,7 +49,7 @@ elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY. fi # Each release can hold multiple assets (e.g. binaries for different architectures, source code, etc.) -echo "${#assets[@]} available asset(s)" +#echo "${#assets[@]} available asset(s)" #================================================= # UPDATE SOURCE FILES @@ -58,46 +59,23 @@ echo "${#assets[@]} available asset(s)" # Here is an example for Grav, it has to be adapted in accordance with how the upstream releases look like. # Let's loop over the array of assets URLs -for asset_url in ${assets[@]}; do +#for asset_url in ${assets[@]}; do echo "Handling asset at $asset_url" -# Assign the asset to a source file in conf/ directory -# Here we base the source file name upon a unique keyword in the assets url (admin vs. update) -# Leave $src empty to ignore the asset -case $asset_url in - *"admin"*) - src="app" - ;; - *"update"*) - src="app-upgrade" - ;; - *) - src="" - ;; -esac - -# If $src is not empty, let's process the asset -if [ ! -z "$src" ]; then +src="app" # Create the temporary directory tempdir="$(mktemp -d)" # Download sources and calculate checksum -filename=${asset_url##*/} +filename="temp.tar.gz" curl --silent -4 -L $asset_url -o "$tempdir/$filename" checksum=$(sha256sum "$tempdir/$filename" | head -c 64) # Delete temporary directory rm -rf $tempdir -# Get extension -if [[ $filename == *.tar.gz ]]; then - extension=tar.gz -else - extension=${filename##*.} -fi - # Rewrite source file cat < conf/$src.src SOURCE_URL=$asset_url @@ -105,16 +83,11 @@ SOURCE_SUM=$checksum SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=$extension SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= +SOURCE_EXTRACT=true +SOURCE_FILENAME=bookstack.tar.gz EOT echo "... conf/$src.src updated" -else -echo "... asset ignored" -fi - -done - #================================================= # SPECIFIC UPDATE STEPS #================================================= diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml new file mode 100644 index 0000000..4363d38 --- /dev/null +++ b/.github/workflows/updater.yml @@ -0,0 +1,50 @@ +# This workflow allows GitHub Actions to automagically update your app whenever a new upstream release is detected. +# You need to enable Actions in your repository settings, and fetch this Action from the YunoHost-Apps organization. +# This file should be enough by itself, but feel free to tune it to your needs. +# It calls updater.sh, which is where you should put the app-specific update steps. +name: Check for new upstream releases +on: + # Allow to manually trigger the workflow + workflow_dispatch: + # Run it every day at 6:00 UTC + schedule: + - cron: '0 6 * * *' +jobs: + updater: + runs-on: ubuntu-latest + steps: + - name: Fetch the source code + uses: actions/checkout@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Run the updater script + id: run_updater + run: | + # Setting up Git user + git config --global user.name 'yunohost-bot' + git config --global user.email 'yunohost-bot@users.noreply.github.com' + # Run the updater script + /bin/bash .github/workflows/updater.sh + - name: Commit changes + id: commit + if: ${{ env.PROCEED == 'true' }} + run: | + git commit -am "Upgrade to v$VERSION" + - name: Create Pull Request + id: cpr + if: ${{ env.PROCEED == 'true' }} + uses: peter-evans/create-pull-request@v3 + 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 }}' + body: | + Upgrade to v${{ env.VERSION }} + [See upstream release page](https://github.com/${{ env.REPO }}/releases/tag/v${{ env.VERSION }}) + draft: false diff --git a/README.md b/README.md index 37de0d4..070862b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # BookStack for YunoHost -[![Integration level](https://dash.yunohost.org/integration/bookstack.svg)](https://dash.yunohost.org/appci/app/bookstack) ![](https://ci-apps.yunohost.org/ci/badges/bookstack.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/bookstack.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/bookstack.svg)](https://dash.yunohost.org/appci/app/bookstack) ![Working status](https://ci-apps.yunohost.org/ci/badges/bookstack.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/bookstack.maintain.svg) [![Install BookStack with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=bookstack) *[Lire ce readme en français.](./README_fr.md)* @@ -26,13 +26,13 @@ BookStack is an opinionated wiki system that provides a pleasant and simple out - Multi-Lingual -**Shipped version:** 22.04.2~ynh1 +**Shipped version:** 22.04.2~ynh2 **Demo:** https://demo.bookstackapp.com ## Screenshots -![](./doc/screenshots/bookstack-hero-screenshot.jpg) +![Screenshot of BookStack](./doc/screenshots/bookstack-hero-screenshot.jpg) ## Disclaimers / important information @@ -46,22 +46,23 @@ For the first time Login with standard authentication, use the default credentia ## Documentation and resources -* Official app website: https://www.bookstackapp.com -* Official user documentation: https://www.bookstackapp.com/docs/user/ -* Official admin documentation: https://www.bookstackapp.com/docs/admin/ -* Upstream app code repository: https://github.com/BookStackApp/BookStack -* YunoHost documentation for this app: https://yunohost.org/app_bookstack -* Report a bug: https://github.com/YunoHost-Apps/bookstack_ynh/issues +* Official app website: +* Official user documentation: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/bookstack_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/bookstack_ynh/tree/testing --debug or sudo yunohost app upgrade bookstack -u https://github.com/YunoHost-Apps/bookstack_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index b747be6..3076945 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # BookStack pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/bookstack.svg)](https://dash.yunohost.org/appci/app/bookstack) ![](https://ci-apps.yunohost.org/ci/badges/bookstack.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/bookstack.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/bookstack.svg)](https://dash.yunohost.org/appci/app/bookstack) ![Status du fonctionnement](https://ci-apps.yunohost.org/ci/badges/bookstack.status.svg) ![Status de maintenance](https://ci-apps.yunohost.org/ci/badges/bookstack.maintain.svg) [![Installer BookStack avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=bookstack) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer BookStack rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* @@ -22,13 +26,13 @@ BookStack is an opinionated wiki system that provides a pleasant and simple out - Multi-Lingual -**Version incluse :** 22.04.2~ynh1 +**Version incluse :** 22.04.2~ynh2 **Démo :** https://demo.bookstackapp.com ## Captures d'écran -![](./doc/screenshots/bookstack-hero-screenshot.jpg) +![Capture d'écran de BookStack](./doc/screenshots/bookstack-hero-screenshot.jpg) ## Avertissements / informations importantes @@ -42,22 +46,23 @@ Pour la première connexion avec une authentification standard, utilisez les inf ## Documentations et ressources -* Site officiel de l'app : https://www.bookstackapp.com -* Documentation officielle utilisateur : https://www.bookstackapp.com/docs/user/ -* Documentation officielle de l'admin : https://www.bookstackapp.com/docs/admin/ -* Dépôt de code officiel de l'app : https://github.com/BookStackApp/BookStack -* Documentation YunoHost pour cette app : https://yunohost.org/app_bookstack -* Signaler un bug : https://github.com/YunoHost-Apps/bookstack_ynh/issues +* Site officiel de l'app : +* Documentation officielle utilisateur : +* Documentation officielle de l'admin : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/bookstack_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/bookstack_ynh/tree/testing --debug ou sudo yunohost app upgrade bookstack -u https://github.com/YunoHost-Apps/bookstack_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :** diff --git a/conf/.env.example b/conf/.env.example index abb20bf..f4f6791 100644 --- a/conf/.env.example +++ b/conf/.env.example @@ -44,7 +44,7 @@ FILE_UPLOAD_SIZE_LIMIT=100 MAIL_DRIVER=smtp # Mail sender details -MAIL_FROM_NAME="BookStack" +MAIL_FROM_NAME=BookStack MAIL_FROM=bookstack@__DOMAIN__ # SMTP mail options @@ -83,7 +83,7 @@ REDIS_SERVERS=127.0.0.1:6379:__REDIS_DB__ # Queue driver to use # Can be 'sync', 'database' or 'redis' -QUEUE_CONNECTION=redis +QUEUE_CONNECTION=database # Storage system to use # Can be 'local', 'local_secure' or 's3' diff --git a/conf/systemd.service b/conf/systemd.service new file mode 100644 index 0000000..fdb603b --- /dev/null +++ b/conf/systemd.service @@ -0,0 +1,11 @@ +[Unit] +Description=BookStack Queue Worker + +[Service] +User=__APP__ +Group=__APP__ +Restart=always +ExecStart=/usr/bin/php__PHPVERSION__ __FINALPATH__/artisan queue:work --sleep=3 --tries=1 --max-time=3600 + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/manifest.json b/manifest.json index 8ac0441..0dc6777 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Platform to create documentation/wiki content", "fr": "Plateforme pour créer du contenu de documentation/wiki" }, - "version": "22.04.2~ynh1", + "version": "22.04.2~ynh2", "url": "https://www.bookstackapp.com/", "upstream": { "license": "MIT", diff --git a/scripts/_common.sh b/scripts/_common.sh index 83e5596..368e7fa 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,7 +8,7 @@ YNH_PHP_VERSION="8.0" pkg_dependencies="php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-tidy php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gd" -YNH_COMPOSER_VERSION=2.2.7 +YNH_COMPOSER_VERSION=2.3.5 #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index ae47347..f1fc3d4 100644 --- a/scripts/backup +++ b/scripts/backup @@ -50,6 +50,12 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +#================================================= +# BACKUP SYSTEMD +#================================================= + +ynh_backup --src_path="/etc/systemd/system/$app.service" + #================================================= # BACKUP THE MYSQL DATABASE #================================================= diff --git a/scripts/change_url b/scripts/change_url index 6e51285..d9a8b9e 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -63,6 +63,15 @@ then change_path=1 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" + #================================================= # STANDARD MODIFICATIONS #================================================= @@ -107,6 +116,15 @@ popd sed -i "/APP_URL=/c\APP_URL=https://${new_domain}${new_path}" $final_path/.env +#================================================= +# GENERIC FINALISATION +#================================================= +# START SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Starting a systemd service..." --weight=1 + +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" + #================================================= # RELOAD NGINX #================================================= diff --git a/scripts/install b/scripts/install index e056634..fe11fde 100644 --- a/scripts/install +++ b/scripts/install @@ -144,6 +144,29 @@ chmod -R o-rwx $final_path chown -R $app:www-data $final_path chown $app:$app $final_path/.env +#================================================= +# SETUP SYSTEMD +#================================================= +ynh_script_progression --message="Configuring a systemd service..." --weight=1 + +# Create a dedicated systemd config +ynh_add_systemd_config + +#================================================= +# INTEGRATE SERVICE IN YUNOHOST +#================================================= +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 + +yunohost service add $app --description="BookStack Queue Worker" --log="/var/log/$app/$app.log" + +#================================================= +# 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" + #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/remove b/scripts/remove index 1d03002..98d2f79 100644 --- a/scripts/remove +++ b/scripts/remove @@ -22,6 +22,27 @@ db_user=$db_name final_path=$(ynh_app_setting_get --app=$app --key=final_path) redis_db=$(ynh_app_setting_get --app=$app --key=redis_db) +#================================================= +# STANDARD REMOVE +#================================================= +# REMOVE SERVICE INTEGRATION IN YUNOHOST +#================================================= + +# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) +if ynh_exec_warn_less yunohost service status $app >/dev/null +then + ynh_script_progression --message="Removing $app service integration..." --weight=1 + 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 THE MYSQL DATABASE #================================================= diff --git a/scripts/restore b/scripts/restore index b7288a5..9157e26 100644 --- a/scripts/restore +++ b/scripts/restore @@ -96,6 +96,28 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql +#================================================= +# RESTORE SYSTEMD +#================================================= +ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/systemd/system/$app.service" +systemctl enable $app.service --quiet + +#================================================= +# INTEGRATE SERVICE IN YUNOHOST +#================================================= +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 + +yunohost service add $app --description="BookStack Queue Worker" --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" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 5aaf02c..6a4d9b7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -163,6 +163,28 @@ chmod -R o-rwx $final_path chown -R $app:www-data $final_path chown $app:$app $final_path/.env +#================================================= +# SETUP SYSTEMD +#================================================= +ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 + +# Create a dedicated systemd config +ynh_add_systemd_config + +#================================================= +# INTEGRATE SERVICE IN YUNOHOST +#================================================= +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 + +yunohost service add $app --description="BookStack Queue Worker" --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" + #================================================= # RELOAD NGINX #================================================= From 14b543ce6a5ed25c28439d38aeff9095d32399b8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 25 May 2022 16:35:15 +0000 Subject: [PATCH 2/2] Auto-update README --- README_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_fr.md b/README_fr.md index 3076945..8c27997 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # BookStack pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/bookstack.svg)](https://dash.yunohost.org/appci/app/bookstack) ![Status du fonctionnement](https://ci-apps.yunohost.org/ci/badges/bookstack.status.svg) ![Status de maintenance](https://ci-apps.yunohost.org/ci/badges/bookstack.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/bookstack.svg)](https://dash.yunohost.org/appci/app/bookstack) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/bookstack.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/bookstack.maintain.svg) [![Installer BookStack avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=bookstack) *[Read this readme in english.](./README.md)*