1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/miniflux_ynh.git synced 2024-09-03 19:45:58 +02:00

Merge pull request #13 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2021-12-13 07:31:59 +01:00 committed by GitHub
commit 133b28f842
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 56 additions and 63 deletions

View file

@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Minimalist and opinionated RSS feed reader
**Shipped version:** 2.0.33~ynh1
**Shipped version:** 2.0.33~ynh2

View file

@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
Minimalist and opinionated RSS feed reader
**Version incluse :** 2.0.33~ynh1
**Version incluse :** 2.0.33~ynh2

View file

@ -1,6 +0,0 @@
SOURCE_URL=https://github.com/miniflux/v2/releases/download/2.0.33/miniflux-linux-armv5
SOURCE_SUM=f0e11903bb3688ab4aa08746b4f904c9a71c94d5f005cc4f5d3fdbb58745c3de
SOURCE_SUM_PRG=sha256sum
SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=miniflux
SOURCE_EXTRACT=false

View file

@ -1,6 +0,0 @@
SOURCE_URL=https://github.com/miniflux/v2/releases/download/2.0.33/miniflux-linux-armv6
SOURCE_SUM=7aa84c40f3b272cd67c1a599710e8979e08bb715360d065b4578fc5c6a97d9c3
SOURCE_SUM_PRG=sha256sum
SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=miniflux
SOURCE_EXTRACT=false

View file

@ -1,11 +1,6 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
proxy_pass http://127.0.0.1:__PORT____PATH__/;
proxy_redirect off;
proxy_set_header Host $host;

View file

@ -6,7 +6,7 @@
"en": "Minimalist and opinionated RSS feed reader",
"fr": "Agrégateur de flux RSS minimaliste"
},
"version": "2.0.33~ynh1",
"version": "2.0.33~ynh2",
"url": "https://miniflux.app/",
"upstream": {
"license": "Apache-2.0",
@ -19,7 +19,7 @@
"name": "eric_G"
},
"requirements": {
"yunohost": ">= 4.2.4"
"yunohost": ">= 4.3.0"
},
"multi_instance": true,
"services": [

View file

@ -18,31 +18,3 @@ pkg_dependencies="postgresql apt-transport-https"
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================
# Check the architecture
#
# example: architecture=$(ynh_detect_arch)
#
# usage: ynh_detect_arch
#
# Requires YunoHost version 2.2.4 or higher.
ynh_detect_arch(){
local architecture
if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then
architecture="arm64"
elif [ -n "$(uname -m | grep 64)" ]; then
architecture="amd64"
elif [ -n "$(uname -m | grep 86)" ]; then
architecture="386"
elif [ -n "$(uname -m | grep armv7)" ]; then
architecture="arm7"
elif [ -n "$(uname -m | grep armv6)" ]; then
architecture="arm6"
elif [ -n "$(uname -m | grep armv5)" ]; then
architecture="arm5"
else
architecture="unknown"
fi
echo $architecture
}

View file

@ -50,6 +50,12 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup --src_path="/etc/systemd/system/$app.service"
#=================================================
# BACKUP LOGROTATE
#=================================================
ynh_backup --src_path="/etc/logrotate.d/$app"
#=================================================
# BACKUP THE POSTGRESQL DATABASE
#=================================================

View file

@ -23,7 +23,7 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC
architecture=$(ynh_detect_arch)
architecture=$YNH_ARCH
password=$YNH_APP_ARG_PASSWORD
admin=$YNH_APP_ARG_ADMIN
@ -49,6 +49,7 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=admin --value=$admin
ynh_app_setting_set --app=$app --key=password --value=$password
ynh_app_setting_set --app=$app --key=architecture --value=$architecture
#=================================================
# STANDARD MODIFICATIONS
@ -126,6 +127,14 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=1
ynh_add_systemd_config
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Configuring log rotation..." --weight=1
# Use logrotate to manage application logfile(s)
ynh_use_logrotate
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================

View file

@ -75,6 +75,14 @@ ynh_script_progression --message="Removing NGINX web server configuration..." --
# Remove the dedicated NGINX config
ynh_remove_nginx_config
#=================================================
# REMOVE LOGROTATE CONFIGURATION
#=================================================
ynh_script_progression --message="Removing logrotate configuration..." --weight=1
# Remove the app-specific logrotate config
ynh_remove_logrotate
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -99,6 +99,13 @@ ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description="Minimalist feed reader" --log="/var/log/$app/$app.log"
#=================================================
# RESTORE THE LOGROTATE CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#=================================================
# START SYSTEMD SERVICE
#=================================================

View file

@ -20,7 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
port=$(ynh_app_setting_get --app=$app --key=port)
architecture=$(ynh_detect_arch)
architecture=$YNH_ARCH
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
@ -32,18 +32,6 @@ ynh_script_progression --message="Checking version..."
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
@ -58,6 +46,18 @@ ynh_clean_setup () {
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
@ -114,6 +114,14 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=2
ynh_add_systemd_config
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1
# Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================