1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wallabag2_ynh.git synced 2024-10-01 13:35:06 +02:00

Merge branch 'testing' into ci-auto-update-2.6.9

This commit is contained in:
eric_G 2024-07-20 15:56:46 +02:00 committed by GitHub
commit 9415262d27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 28 additions and 20 deletions

View file

@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# Wallabag for YunoHost
[![Integration level](https://dash.yunohost.org/integration/wallabag2.svg)](https://dash.yunohost.org/appci/app/wallabag2) ![Working status](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg)
[![Integration level](https://dash.yunohost.org/integration/wallabag2.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) ![Working status](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg)
[![Install Wallabag with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=wallabag2)

View file

@ -5,7 +5,7 @@ No se debe editar a mano.
# Wallabag para Yunohost
[![Nivel de integración](https://dash.yunohost.org/integration/wallabag2.svg)](https://dash.yunohost.org/appci/app/wallabag2) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg)
[![Nivel de integración](https://dash.yunohost.org/integration/wallabag2.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg)
[![Instalar Wallabag con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=wallabag2)

View file

@ -5,7 +5,7 @@ EZ editatu eskuz.
# Wallabag YunoHost-erako
[![Integrazio maila](https://dash.yunohost.org/integration/wallabag2.svg)](https://dash.yunohost.org/appci/app/wallabag2) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg)
[![Integrazio maila](https://dash.yunohost.org/integration/wallabag2.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg)
[![Instalatu Wallabag YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=wallabag2)

View file

@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main.
# Wallabag pour YunoHost
[![Niveau dintégration](https://dash.yunohost.org/integration/wallabag2.svg)](https://dash.yunohost.org/appci/app/wallabag2) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg)
[![Niveau dintégration](https://dash.yunohost.org/integration/wallabag2.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg)
[![Installer Wallabag avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=wallabag2)

View file

@ -5,7 +5,7 @@ NON debe editarse manualmente.
# Wallabag para YunoHost
[![Nivel de integración](https://dash.yunohost.org/integration/wallabag2.svg)](https://dash.yunohost.org/appci/app/wallabag2) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg)
[![Nivel de integración](https://dash.yunohost.org/integration/wallabag2.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg)
[![Instalar Wallabag con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=wallabag2)

View file

@ -5,7 +5,7 @@
# YunoHost 上的 Wallabag
[![集成程度](https://dash.yunohost.org/integration/wallabag2.svg)](https://dash.yunohost.org/appci/app/wallabag2) ![工作状态](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg)
[![集成程度](https://dash.yunohost.org/integration/wallabag2.svg)](https://ci-apps.yunohost.org/ci/apps/wallabag2/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/wallabag2.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/wallabag2.maintain.svg)
[![使用 YunoHost 安装 Wallabag](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=wallabag2)

View file

@ -22,14 +22,17 @@ parameters:
fos_oauth_server_refresh_token_lifetime: 1209600
from_email: no-reply@wallabag.org
rss_limit: 50
rabbitmq_host: localhost
rabbitmq_port: 5672
rabbitmq_user: guest
rabbitmq_password: guest
rabbitmq_prefetch_count: 10
redis_scheme: tcp
redis_host: localhost
redis_port: 6379
redis_path: null
redis_password: null
sentry_dsn: ~

View file

@ -1,5 +1,8 @@
#!/bin/bash
# Source YunoHost helpers
source /usr/share/yunohost/helpers
app="__APP__"
user="__APP__"
install_dir=$(ynh_app_setting_get --app="$app" --key=install_dir)
@ -9,9 +12,6 @@ phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion)
username=$1
user_email=$2
# Source YunoHost helpers
source /usr/share/yunohost/helpers
# Generate a random password
user_pass=$(ynh_string_random)

View file

@ -1,5 +1,8 @@
#!/bin/bash
# Source YunoHost helpers
source /usr/share/yunohost/helpers
app="__APP__"
user="__APP__"
install_dir=$(ynh_app_setting_get --app="$app" --key=install_dir)

View file

@ -6,7 +6,11 @@
YNH_COMPOSER_VERSION="2.7.7"
wb_conf="$install_dir/app/config/parameters.yml"
# Define a function to execute commands with `php_exec`
php_exec() {
(cd "$install_dir" && ynh_exec_as "$app" \
php${phpversion} "$install_dir/bin/console" --no-interaction --env=prod "$@")
}
#=================================================
# PERSONAL HELPERS

View file

@ -24,7 +24,7 @@ ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name
<<< "UPDATE internal_setting SET value = 'https://$new_domain$new_path' WHERE name = 'wallabag_url'"
# Change domain name in parameters.yml
ynh_replace_string --target_file="$wb_conf" --match_string="domain_name: .*" --replace_string="domain_name: https://$new_domain$new_path"
ynh_replace_string --target_file="$install_dir/app/config/parameters.yml" --match_string="domain_name: .*" --replace_string="domain_name: https://$new_domain$new_path"
# If "Download images locally" option has been enabled in Internal Settings
download_images_enabled=$(ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" \

View file

@ -56,22 +56,22 @@ ynh_add_config --template="parameters.yml" --destination="$wb_conf"
chmod 600 "$wb_conf"
chown "$app:www-data" "$wb_conf"
# Alias for php-cli execution command
php_exec=("php$phpversion" "$install_dir/bin/console" --no-interaction --env=prod)
chmod 600 "$install_dir/app/config/parameters.yml"
chown "$app:$app" "$install_dir/app/config/parameters.yml"
# Install dependencies and Wallabag
ynh_exec_warn_less ynh_exec_as "$app" "${php_exec[@]}" wallabag:install
php_exec wallabag:install
# Add users to Wallabag
for username in $(ynh_user_list); do
user_email=$(ynh_user_get_info --username="$username" --key=mail)
# We don't care about that thanks to LDAP
user_pass=$(ynh_string_random)
ynh_exec_as "$app" "${php_exec[@]}" fos:user:create "$username" "$user_email" "$user_pass"
php_exec fos:user:create "$username" "$user_email" "$user_pass"
done
# Set admin user
ynh_exec_as "$app" "${php_exec[@]}" fos:user:promote --super "$admin"
php_exec fos:user:promote --super "$admin"
# Configure Wallabag instance URL
ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" \

View file

@ -23,8 +23,6 @@ if [ -e "$install_dir/var/cache/prod/appProdProjectContainer.php" ]; then
chmod 700 "$install_dir/var/cache/prod/appProdProjectContainer.php"
fi
chmod 600 "$wb_conf"
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================

View file

@ -54,8 +54,8 @@ chown "$app:www-data" "$wb_conf"
php_exec=("php$phpversion" "$install_dir/bin/console" --no-interaction --env=prod)
# Upgrade database and clear the cache
ynh_exec_as "$app" "${php_exec[@]}" doctrine:migrations:migrate
ynh_exec_as "$app" "${php_exec[@]}" cache:clear
php_exec doctrine:migrations:migrate
php_exec cache:clear
# Configure Wallabag instance URL
ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" \