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. Minimalist and opinionated RSS feed reader.
**Shipped version:** 2.2.0~ynh1 **Shipped version:** 2.2.0~ynh2
## Screenshots ## Screenshots

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,52 +1,35 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source ../settings/scripts/_common.sh source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= ynh_print_info "Declaring files to be backed up..."
# DECLARE DATA AND CONF FILES TO BACKUP
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
#================================================= #=================================================
# BACKUP THE APP MAIN DIR # 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"
#================================================= ynh_backup "/etc/systemd/system/$app.service"
# BACKUP SYSTEMD
#=================================================
ynh_backup --src_path="/etc/systemd/system/$app.service" ynh_backup "/etc/logrotate.d/$app"
#=================================================
# BACKUP LOGROTATE
#=================================================
ynh_backup --src_path="/etc/logrotate.d/$app"
#================================================= #=================================================
# BACKUP THE POSTGRESQL DATABASE # 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 # 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 #!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#================================================= #=================================================
# STOP SYSTEMD SERVICE # 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 # 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 # ADD A CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_script_progression "Adding $app's configuration..."
domain="$new_domain" domain="$new_domain"
path="$new_path" 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" chmod 600 "$install_dir/$app.conf"
#=================================================
# GENERIC FINALISATION
#================================================= #=================================================
# START SYSTEMD SERVICE # 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 # 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 # 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 #!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
@ -14,32 +8,30 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
password=$YNH_APP_ARG_PASSWORD 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 # 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 # 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" 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" chmod +x "$install_dir/miniflux"
#================================================= #=================================================
# ADD A CONFIGURATION # 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" chmod 600 "$install_dir/$app.conf"
chown $app "$install_dir/$app.conf" chown $app "$install_dir/$app.conf"
@ -47,25 +39,25 @@ chown $app "$install_dir/$app.conf"
#================================================= #=================================================
# SYSTEM CONFIGURATION # 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" yunohost service add $app --description="Minimalist feed reader" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# START SYSTEMD SERVICE # 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 # 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 #!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
@ -14,22 +8,22 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# REMOVE SYSTEMD SERVICE # 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 then
ynh_script_progression --message="Removing $app service..." --weight=1 ynh_script_progression "Removing $app service..."
yunohost service remove $app yunohost service remove $app
fi 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 # 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 #!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source ../settings/scripts/_common.sh source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= #=================================================
# RESTORE THE APP MAIN DIR # 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" chmod +x "$install_dir/miniflux"
chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# RESTORE THE POSTGRESQL DATABASE # 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 SYSTEM CONFIGURATIONS
#================================================= #=================================================
# RESTORE THE PHP-FPM CONFIGURATION # 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 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" yunohost service add $app --description="Minimalist feed reader" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# START SYSTEMD SERVICE # 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 # 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 #!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# STANDARD UPGRADE STEPS
#================================================= #=================================================
# STOP SYSTEMD SERVICE # 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 # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression "Upgrading source files..."
if [ "$upgrade_type" == "UPGRADE_APP" ] ynh_setup_source --dest_dir=$install_dir --keep="$app.conf"
then
ynh_script_progression --message="Upgrading source files..." --weight=5
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" chmod +x "$install_dir/miniflux"
#================================================= #=================================================
# REAPPLY SYSTEM CONFIGURATIONS # 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" yunohost service add $app --description="Minimalist feed reader" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# START SYSTEMD SERVICE # 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 # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Upgrade of $app completed" --last ynh_script_progression "Upgrade of $app completed"