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 #55 from YunoHost-Apps/testing

Testing
This commit is contained in:
eric_G 2024-08-19 09:33:58 +02:00 committed by GitHub
commit d8caf322ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 77 additions and 154 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
*~
*.sw[op]
.DS_Store

View file

@ -18,7 +18,7 @@ It shall NOT be edited by hand.
Minimalist and opinionated RSS feed reader.
**Shipped version:** 2.2.0~ynh1
**Shipped version:** 2.2.0~ynh2
## Screenshots

View file

@ -18,7 +18,7 @@ No se debe editar a mano.
Minimalist and opinionated RSS feed reader.
**Versión actual:** 2.2.0~ynh1
**Versión actual:** 2.2.0~ynh2
## Capturas

View file

@ -18,7 +18,7 @@ EZ editatu eskuz.
Minimalist and opinionated RSS feed reader.
**Paketatutako bertsioa:** 2.2.0~ynh1
**Paketatutako bertsioa:** 2.2.0~ynh2
## Pantaila-argazkiak

View file

@ -18,7 +18,7 @@ Il NE doit PAS être modifié à la main.
Lecteur de flux RSS minimaliste.
**Version incluse:** 2.2.0~ynh1
**Version incluse:** 2.2.0~ynh2
## Captures décran

View file

@ -18,7 +18,7 @@ NON debe editarse manualmente.
Minimalist and opinionated RSS feed reader.
**Versión proporcionada:** 2.2.0~ynh1
**Versión proporcionada:** 2.2.0~ynh2
## Capturas de pantalla

View file

@ -18,7 +18,7 @@ Ini TIDAK boleh diedit dengan tangan.
Minimalist and opinionated RSS feed reader.
**Versi terkirim:** 2.2.0~ynh1
**Versi terkirim:** 2.2.0~ynh2
## Tangkapan Layar

View file

@ -18,7 +18,7 @@
Minimalist and opinionated RSS feed reader.
**Поставляемая версия:** 2.2.0~ynh1
**Поставляемая версия:** 2.2.0~ynh2
## Снимки экрана

View file

@ -18,7 +18,7 @@
Minimalist and opinionated RSS feed reader.
**分发版本:** 2.2.0~ynh1
**分发版本:** 2.2.0~ynh2
## 截图

View file

@ -5,7 +5,7 @@ name = "Miniflux"
description.en = "Minimalist and opinionated RSS feed reader"
description.fr = "Agrégateur de flux RSS minimaliste"
version = "2.2.0~ynh1"
version = "2.2.0~ynh2"
maintainers = []
@ -16,7 +16,8 @@ admindoc = "https://miniflux.app/docs/index.html"
code = "https://github.com/miniflux/v2"
[integration]
yunohost = ">= 11.2"
yunohost = ">= 11.2.27"
helpers_version = "2.1"
architectures = ["amd64", "armhf", "arm64"]
multi_instance = true

View file

@ -1,17 +1,5 @@
#!/bin/bash
#=================================================
# COMMON VARIABLES
#=================================================
#=================================================
# PERSONAL HELPERS
#=================================================
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
# COMMON VARIABLES AND CUSTOM HELPERS
#=================================================

View file

@ -1,52 +1,35 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
ynh_print_info "Declaring files to be backed up..."
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_backup --src_path="$install_dir"
ynh_backup "$install_dir"
#=================================================
# BACKUP THE NGINX CONFIGURATION
# SYSTEM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP SYSTEMD
#=================================================
ynh_backup "/etc/systemd/system/$app.service"
ynh_backup --src_path="/etc/systemd/system/$app.service"
#=================================================
# BACKUP LOGROTATE
#=================================================
ynh_backup --src_path="/etc/logrotate.d/$app"
ynh_backup "/etc/logrotate.d/$app"
#=================================================
# BACKUP THE POSTGRESQL DATABASE
#=================================================
ynh_print_info --message="Backing up the PostgreSQL database..."
ynh_print_info "Backing up the PostgreSQL database..."
ynh_psql_dump_db --database="$db_name" > db.sql
ynh_psql_dump_db > db.sql
#=================================================
# END OF SCRIPT
#=================================================
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."

View file

@ -1,53 +1,43 @@
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_script_progression "Stopping $app's systemd service..."
ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log"
ynh_systemctl --service=$app --action=stop
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
ynh_script_progression "Updating NGINX web server configuration..."
ynh_change_url_nginx_config
ynh_config_change_url_nginx
#=================================================
# ADD A CONFIGURATION
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_script_progression "Adding $app's configuration..."
domain="$new_domain"
path="$new_path"
ynh_add_config --template="../conf/miniflux.conf" --destination="$install_dir/$app.conf"
ynh_config_add --template="miniflux.conf" --destination="$install_dir/$app.conf"
chmod 600 "$install_dir/$app.conf"
#=================================================
# GENERIC FINALISATION
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_script_progression "Starting $app's systemd service..."
# Start a systemd service
ynh_systemd_action --service_name=$app --action=start --log_path=systemd
ynh_systemctl --service=$app --action=start --log_path=systemd
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Change of URL completed for $app" --last
ynh_script_progression "Change of URL completed for $app"

View file

@ -1,11 +1,5 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
@ -14,32 +8,30 @@ source /usr/share/yunohost/helpers
#=================================================
password=$YNH_APP_ARG_PASSWORD
ynh_app_setting_set --app=$app --key=password --value=$password
ynh_app_setting_set --key=password --value=$password
#=================================================
# CREATE A POSTGRESQL DATABASE
#=================================================
ynh_script_progression --message="Creating a PostgreSQL database..." --weight=2
ynh_script_progression "Creating a PostgreSQL database..."
ynh_psql_execute_as_root --sql="CREATE EXTENSION hstore;" --database=$db_name
ynh_psql_db_shell <<< "CREATE EXTENSION hstore;"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..." --weight=1
ynh_script_progression "Setting up source files..."
ynh_setup_source --dest_dir="$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
chmod +x "$install_dir/miniflux"
#=================================================
# ADD A CONFIGURATION
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_script_progression "Adding $app's configuration..."
ynh_add_config --template="miniflux.conf" --destination="$install_dir/$app.conf"
ynh_config_add --template="miniflux.conf" --destination="$install_dir/$app.conf"
chmod 600 "$install_dir/$app.conf"
chown $app "$install_dir/$app.conf"
@ -47,25 +39,25 @@ chown $app "$install_dir/$app.conf"
#=================================================
# SYSTEM CONFIGURATION
#=================================================
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
ynh_script_progression "Adding system configurations related to $app..."
ynh_add_nginx_config
ynh_config_add_nginx
ynh_add_systemd_config
ynh_config_add_systemd
ynh_use_logrotate
ynh_config_add_logrotate
yunohost service add $app --description="Minimalist feed reader" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=2
ynh_script_progression "Starting $app's systemd service..."
ynh_systemd_action --service_name=$app --action=start --log_path=systemd
ynh_systemctl --service=$app --action=start --log_path=systemd
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Installation of $app completed" --last
ynh_script_progression "Installation of $app completed"

View file

@ -1,11 +1,5 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
@ -14,22 +8,22 @@ source /usr/share/yunohost/helpers
#=================================================
# REMOVE SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
ynh_script_progression "Removing system configurations related to $app..."
if ynh_exec_warn_less yunohost service status $app >/dev/null
if ynh_hide_warnings yunohost service status $app >/dev/null
then
ynh_script_progression --message="Removing $app service..." --weight=1
ynh_script_progression "Removing $app service..."
yunohost service remove $app
fi
ynh_remove_systemd_config
ynh_config_remove_systemd
ynh_remove_nginx_config
ynh_config_remove_nginx
ynh_remove_logrotate
ynh_config_remove_logrotate
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Removal of $app completed" --last
ynh_script_progression "Removal of $app completed"

View file

@ -1,59 +1,51 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring $app main directory..." --weight=4
ynh_script_progression "Restoring $app main directory..."
ynh_restore_file --origin_path="$install_dir"
ynh_restore "$install_dir"
chmod -R o-rwx "$install_dir"
chmod +x "$install_dir/miniflux"
chown -R $app:www-data "$install_dir"
#=================================================
# RESTORE THE POSTGRESQL DATABASE
#=================================================
ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=6
ynh_script_progression "Restoring the PostgreSQL database..."
ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
ynh_psql_db_shell < "./db.sql"
#=================================================
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
ynh_script_progression "Restoring system configurations related to $app..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
ynh_restore "/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
ynh_restore "/etc/logrotate.d/$app"
yunohost service add $app --description="Minimalist feed reader" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_script_progression "Starting $app's systemd service..."
ynh_systemd_action --service_name=$app --action=start --log_path=systemd
ynh_systemctl --service=$app --action=start --log_path=systemd
ynh_systemd_action --service_name=nginx --action=reload
ynh_systemctl --service=nginx --action=reload
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Restoration completed for $app" --last
ynh_script_progression "Restoration completed for $app"

View file

@ -1,66 +1,46 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_script_progression "Stopping $app's systemd service..."
ynh_systemd_action --service_name=$app --action=stop --log_path=systemd
ynh_systemctl --service=$app --action=stop --log_path=systemd
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=5
ynh_script_progression "Upgrading source files..."
ynh_setup_source --dest_dir=$install_dir --keep="$app.conf"
fi
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
chmod +x "$install_dir/miniflux"
#=================================================
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
ynh_script_progression "Upgrading system configurations related to $app..."
ynh_add_nginx_config
ynh_config_add_nginx
ynh_add_systemd_config
ynh_config_add_systemd
ynh_use_logrotate --non-append
ynh_config_add_logrotate
yunohost service add $app --description="Minimalist feed reader" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_script_progression "Starting $app's systemd service..."
ynh_systemd_action --service_name=$app --action=start --log_path=systemd
ynh_systemctl --service=$app --action=start --log_path=systemd
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Upgrade of $app completed" --last
ynh_script_progression "Upgrade of $app completed"