mirror of
https://github.com/YunoHost-Apps/miniflux_ynh.git
synced 2024-09-03 19:45:58 +02:00
4.3
This commit is contained in:
parent
83f588cf37
commit
fe4c3af425
10 changed files with 47 additions and 43 deletions
|
@ -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
|
|
@ -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
|
|
@ -19,7 +19,7 @@
|
|||
"name": "eric_G"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.2.4"
|
||||
"yunohost": ">= 4.3.0"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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_app_setting_get --app=$app --key=architecture)
|
||||
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)
|
||||
|
@ -51,6 +51,12 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
|
||||
# If architecture doesn't exist, create it
|
||||
if [ -z "$architecture" ]; then
|
||||
architecture="dpkg --print-architecture"
|
||||
architecture=$(ynh_app_setting_get --app=$app --key=architecture)
|
||||
fi
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
@ -114,6 +120,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
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue