1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/bookstack_ynh.git synced 2024-09-03 18:16:02 +02:00
* 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 faec2bb235.

* 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 <tituspijean@outlook.com>
Co-authored-by: YunoHost Bot <yunohost-bot@users.noreply.github.com>
Co-authored-by: Yunohost-Bot <>
Co-authored-by: OniriCorpe <oniricorpe@disroot.org>
Co-authored-by: yunohost-bot <yunohost@yunohost.org>
This commit is contained in:
Éric Gaspar 2022-05-25 18:35:13 +02:00 committed by GitHub
parent 2960899fc4
commit f47c560c2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 215 additions and 63 deletions

View file

@ -10,7 +10,7 @@
# automatic actions when a new upstream release is detected. # automatic actions when a new upstream release is detected.
# Remove this exit command when you are ready to run this Action # Remove this exit command when you are ready to run this Action
exit 1 #exit 1
#================================================= #=================================================
# FETCHING LATEST RELEASE AND ITS ASSETS # 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]') 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) # 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) 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 # 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. # 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 fi
# Each release can hold multiple assets (e.g. binaries for different architectures, source code, etc.) # 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 # 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. # 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 # 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" echo "Handling asset at $asset_url"
# Assign the asset to a source file in conf/ directory src="app"
# 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
# Create the temporary directory # Create the temporary directory
tempdir="$(mktemp -d)" tempdir="$(mktemp -d)"
# Download sources and calculate checksum # Download sources and calculate checksum
filename=${asset_url##*/} filename="temp.tar.gz"
curl --silent -4 -L $asset_url -o "$tempdir/$filename" curl --silent -4 -L $asset_url -o "$tempdir/$filename"
checksum=$(sha256sum "$tempdir/$filename" | head -c 64) checksum=$(sha256sum "$tempdir/$filename" | head -c 64)
# Delete temporary directory # Delete temporary directory
rm -rf $tempdir rm -rf $tempdir
# Get extension
if [[ $filename == *.tar.gz ]]; then
extension=tar.gz
else
extension=${filename##*.}
fi
# Rewrite source file # Rewrite source file
cat <<EOT > conf/$src.src cat <<EOT > conf/$src.src
SOURCE_URL=$asset_url SOURCE_URL=$asset_url
@ -105,16 +83,11 @@ SOURCE_SUM=$checksum
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=$extension SOURCE_FORMAT=$extension
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true
SOURCE_FILENAME= SOURCE_EXTRACT=true
SOURCE_FILENAME=bookstack.tar.gz
EOT EOT
echo "... conf/$src.src updated" echo "... conf/$src.src updated"
else
echo "... asset ignored"
fi
done
#================================================= #=================================================
# SPECIFIC UPDATE STEPS # SPECIFIC UPDATE STEPS
#================================================= #=================================================

50
.github/workflows/updater.yml vendored Normal file
View file

@ -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 <yunohost-bot@users.noreply.github.com>'
author: 'yunohost-bot <yunohost-bot@users.noreply.github.com>'
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

View file

@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# BookStack for YunoHost # 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) [![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)* *[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 - Multi-Lingual
**Shipped version:** 22.04.2~ynh1 **Shipped version:** 22.04.2~ynh2
**Demo:** https://demo.bookstackapp.com **Demo:** https://demo.bookstackapp.com
## Screenshots ## Screenshots
![](./doc/screenshots/bookstack-hero-screenshot.jpg) ![Screenshot of BookStack](./doc/screenshots/bookstack-hero-screenshot.jpg)
## Disclaimers / important information ## Disclaimers / important information
@ -46,22 +46,23 @@ For the first time Login with standard authentication, use the default credentia
## Documentation and resources ## Documentation and resources
* Official app website: https://www.bookstackapp.com * Official app website: <https://www.bookstackapp.com>
* Official user documentation: https://www.bookstackapp.com/docs/user/ * Official user documentation: <https://www.bookstackapp.com/docs/user/>
* Official admin documentation: https://www.bookstackapp.com/docs/admin/ * Official admin documentation: <https://www.bookstackapp.com/docs/admin/>
* Upstream app code repository: https://github.com/BookStackApp/BookStack * Upstream app code repository: <https://github.com/BookStackApp/BookStack>
* YunoHost documentation for this app: https://yunohost.org/app_bookstack * YunoHost documentation for this app: <https://yunohost.org/app_bookstack>
* Report a bug: https://github.com/YunoHost-Apps/bookstack_ynh/issues * Report a bug: <https://github.com/YunoHost-Apps/bookstack_ynh/issues>
## Developer info ## Developer info
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/bookstack_ynh/tree/testing). 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. To try the testing branch, please proceed like that.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/bookstack_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/bookstack_ynh/tree/testing --debug
or or
sudo yunohost app upgrade bookstack -u https://github.com/YunoHost-Apps/bookstack_ynh/tree/testing --debug 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 **More info regarding app packaging:** <https://yunohost.org/packaging_apps>

View file

@ -1,10 +1,14 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# BookStack pour YunoHost # 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) [![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)* *[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. > *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.* 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 - Multi-Lingual
**Version incluse :** 22.04.2~ynh1 **Version incluse :** 22.04.2~ynh2
**Démo :** https://demo.bookstackapp.com **Démo :** https://demo.bookstackapp.com
## Captures d'écran ## Captures d'écran
![](./doc/screenshots/bookstack-hero-screenshot.jpg) ![Capture d'écran de BookStack](./doc/screenshots/bookstack-hero-screenshot.jpg)
## Avertissements / informations importantes ## Avertissements / informations importantes
@ -42,22 +46,23 @@ Pour la première connexion avec une authentification standard, utilisez les inf
## Documentations et ressources ## Documentations et ressources
* Site officiel de l'app : https://www.bookstackapp.com * Site officiel de l'app : <https://www.bookstackapp.com>
* Documentation officielle utilisateur : https://www.bookstackapp.com/docs/user/ * Documentation officielle utilisateur : <https://www.bookstackapp.com/docs/user/>
* Documentation officielle de l'admin : https://www.bookstackapp.com/docs/admin/ * 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 * Dépôt de code officiel de l'app : <https://github.com/BookStackApp/BookStack>
* Documentation YunoHost pour cette app : https://yunohost.org/app_bookstack * Documentation YunoHost pour cette app : <https://yunohost.org/app_bookstack>
* Signaler un bug : https://github.com/YunoHost-Apps/bookstack_ynh/issues * Signaler un bug : <https://github.com/YunoHost-Apps/bookstack_ynh/issues>
## Informations pour les développeurs ## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/bookstack_ynh/tree/testing). 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. Pour essayer la branche testing, procédez comme suit.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/bookstack_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/bookstack_ynh/tree/testing --debug
ou ou
sudo yunohost app upgrade bookstack -u https://github.com/YunoHost-Apps/bookstack_ynh/tree/testing --debug 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 **Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>

View file

@ -44,7 +44,7 @@ FILE_UPLOAD_SIZE_LIMIT=100
MAIL_DRIVER=smtp MAIL_DRIVER=smtp
# Mail sender details # Mail sender details
MAIL_FROM_NAME="BookStack" MAIL_FROM_NAME=BookStack
MAIL_FROM=bookstack@__DOMAIN__ MAIL_FROM=bookstack@__DOMAIN__
# SMTP mail options # SMTP mail options
@ -83,7 +83,7 @@ REDIS_SERVERS=127.0.0.1:6379:__REDIS_DB__
# Queue driver to use # Queue driver to use
# Can be 'sync', 'database' or 'redis' # Can be 'sync', 'database' or 'redis'
QUEUE_CONNECTION=redis QUEUE_CONNECTION=database
# Storage system to use # Storage system to use
# Can be 'local', 'local_secure' or 's3' # Can be 'local', 'local_secure' or 's3'

11
conf/systemd.service Normal file
View file

@ -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

View file

@ -6,7 +6,7 @@
"en": "Platform to create documentation/wiki content", "en": "Platform to create documentation/wiki content",
"fr": "Plateforme pour créer du contenu de documentation/wiki" "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/", "url": "https://www.bookstackapp.com/",
"upstream": { "upstream": {
"license": "MIT", "license": "MIT",

View file

@ -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" 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 # PERSONAL HELPERS

View file

@ -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" 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 # BACKUP THE MYSQL DATABASE
#================================================= #=================================================

View file

@ -63,6 +63,15 @@ then
change_path=1 change_path=1
fi 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 # STANDARD MODIFICATIONS
#================================================= #=================================================
@ -107,6 +116,15 @@ popd
sed -i "/APP_URL=/c\APP_URL=https://${new_domain}${new_path}" $final_path/.env 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 # RELOAD NGINX
#================================================= #=================================================

View file

@ -144,6 +144,29 @@ chmod -R o-rwx $final_path
chown -R $app:www-data $final_path chown -R $app:www-data $final_path
chown $app:$app $final_path/.env 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 # SETUP SSOWAT
#================================================= #=================================================

View file

@ -22,6 +22,27 @@ db_user=$db_name
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
redis_db=$(ynh_app_setting_get --app=$app --key=redis_db) 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 # REMOVE THE MYSQL DATABASE
#================================================= #=================================================

View file

@ -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_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 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 # GENERIC FINALIZATION
#================================================= #=================================================

View file

@ -163,6 +163,28 @@ chmod -R o-rwx $final_path
chown -R $app:www-data $final_path chown -R $app:www-data $final_path
chown $app:$app $final_path/.env 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 # RELOAD NGINX
#================================================= #=================================================