1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wallabag2_ynh.git synced 2024-10-01 13:35:06 +02:00
This commit is contained in:
ericgaspar 2021-06-24 14:53:04 +02:00
parent 113e385900
commit d9780a9207
No known key found for this signature in database
GPG key ID: 574F281483054D44
8 changed files with 25 additions and 32 deletions

View file

@ -11,7 +11,7 @@
setup_private=0
setup_public=0
upgrade=1
upgrade=1 from_commit=f75d58cb32c51a0981333ea88974dc3199324e65
upgrade=1 from_commit=afdd82cbed98b66ff2bf31c30f86ea8f704154f7
backup_restore=1
multi_instance=1
change_url=1
@ -19,6 +19,6 @@
Email=
Notification=none
;;; Upgrade options
; commit=f75d58cb32c51a0981333ea88974dc3199324e65
name= Previous package version
; commit=afdd82cbed98b66ff2bf31c30f86ea8f704154f7
name= version 4.1.0
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&

View file

@ -3,8 +3,8 @@
"id": "wallabag2",
"packaging_format": 1,
"description": {
"en": "A self hostable read-it-later app",
"fr": "Une application de lecture-plus-tard auto-hébergeable"
"en": "Self hostable read-it-later app",
"fr": "Application de lecture-plus-tard auto-hébergeable"
},
"version": "2.4.2~ynh2",
"url": "https://www.wallabag.org",

View file

@ -13,18 +13,10 @@ extra_php_dependencies="php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-mysql ph
# PERSONAL HELPERS
#=================================================
function set_permissions {
# Set permissions to app files
chown -R $app:www-data $final_path
chmod -R g=u,g-w,o-rwx $final_path
# Restrict rights to Wallabag user only
chmod 600 $wb_conf
if [ -e $final_path/var/cache/prod/appProdProjectContainer.php ]; then
chmod 700 $final_path/var/cache/prod/appProdProjectContainer.php
fi
}
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================

View file

@ -98,7 +98,7 @@ fi
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
ynh_script_progression --message="Updating wallabag configuration..."
ynh_script_progression --message="Updating wallabag configuration..." --weight=3
# Change domain name in parameters.yml
ynh_replace_string --match_string="domain_name: .*" --replace_string="domain_name: https://$new_domain$new_path" --target_file=$final_path/app/config/parameters.yml
@ -120,7 +120,7 @@ ynh_secure_remove --file=$final_path/var/cache
#=================================================
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading NGINX web server..."
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
ynh_systemd_action --service_name=nginx --action=reload

View file

@ -96,7 +96,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
# CONFIGURE WALLABAG
#=================================================
ynh_script_progression --message="Configuring wallabag..." --weight=35
ynh_script_progression --message="Configuring Wallabag..." --weight=35
# Generate random DES key & password
deskey=$(ynh_string_random --length=24)

View file

@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Loading installation settings..."
ynh_script_progression --message="Loading installation settings..." --weight=1
app=$YNH_APP_INSTANCE_NAME
@ -42,7 +42,7 @@ ynh_secure_remove --file="$final_path"
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Removing nginx web server configuration"
ynh_script_progression --message="Removing NGINX web server configuration" --weight=1
# Remove the dedicated nginx config
ynh_remove_nginx_config
@ -50,7 +50,7 @@ ynh_remove_nginx_config
#=================================================
# REMOVE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Removing php-fpm configuration"
ynh_script_progression --message="Removing PHP-FPM configuration" --weight=3
# Remove the dedicated php-fpm config
ynh_remove_fpm_config
@ -58,6 +58,7 @@ ynh_remove_fpm_config
#=================================================
# REMOVE FAIL2BAN CONFIGURATION
#=================================================
ynh_script_progression --message="Removing Fail2ban configuration..." --weight=1
ynh_remove_fail2ban_config
@ -66,7 +67,7 @@ ynh_remove_fail2ban_config
#=================================================
# REMOVE DEDICATED USER
#=================================================
ynh_script_progression --message="Removing the dedicated system user"
ynh_script_progression --message="Removing the dedicated system user" --weight=1
# Delete a system user
ynh_system_user_delete --username=$app

View file

@ -34,7 +34,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
# CHECK IF THE APP CAN BE RESTORED
#=================================================
ynh_script_progression --message="Validating restoration parameters..."
ynh_script_progression --message="Validating restoration parameters..." --weight=1
ynh_webpath_available --domain=$domain --path_url=$path_url \
|| ynh_die --message="Path not available: ${domain}${path_url}"
@ -60,7 +60,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring the app main directory..."
ynh_script_progression --message="Restoring the app main directory..." --weight=2
ynh_restore_file --origin_path="$final_path"
@ -110,7 +110,7 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./
#=================================================
# RELOAD NGINX AND PHP-FPM
#=================================================
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..."
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=3
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
ynh_systemd_action --service_name=nginx --action=reload

View file

@ -48,7 +48,7 @@ ynh_abort_if_errors
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..."
ynh_script_progression --message="Ensuring downward compatibility..." --weight=2
# If db_name doesn't exist, create it
if [ -z "$db_name" ]; then
@ -86,7 +86,7 @@ fi
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..."
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path"
@ -112,7 +112,7 @@ fi
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..."
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=3
# Create a dedicated nginx config
ynh_add_nginx_config
@ -120,7 +120,7 @@ ynh_add_nginx_config
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..."
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
# Create a dedicated php-fpm config
ynh_add_fpm_config --package="$extra_php_dependencies"
@ -193,7 +193,7 @@ ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_fil
#=================================================
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading NGINX web server..."
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
ynh_systemd_action --service_name=nginx --action=reload