1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/agendav_ynh.git synced 2024-09-03 20:36:12 +02:00

Small fixes

This commit is contained in:
ericgaspar 2020-10-21 10:27:39 +02:00
parent 64f09e4aaf
commit 2eba93a71e
No known key found for this signature in database
GPG key ID: 574F281483054D44
6 changed files with 27 additions and 28 deletions

View file

@ -36,7 +36,7 @@ ynh_print_info --message="Declaring files to be backed up..."
#================================================= #=================================================
# BACKUP THE APP MAIN DIR # BACKUP THE APP MAIN DIR
#================================================= #=================================================
ynh_script_progression --message="Backing up the main app directory..." ynh_script_progression --message="Backing up AgenDAV directory..."
# Clean cache files before backup # Clean cache files before backup
ynh_secure_remove --file=${final_path}/web/var/cache/profiler ynh_secure_remove --file=${final_path}/web/var/cache/profiler
@ -75,4 +75,4 @@ ynh_backup --src_path="/etc/logrotate.d/$app"
# 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 --message="Backup script completed for AgenDAV. (YunoHost will then actually copy those files to the archive)."

View file

@ -50,7 +50,7 @@ fi
#================================================= #=================================================
# MODIFY URL IN NGINX CONF # MODIFY URL IN NGINX CONF
#================================================= #=================================================
ynh_script_progression --message="Updating nginx web server configuration..." --weight=2 ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
@ -81,7 +81,7 @@ fi
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading nginx web server..." ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
@ -89,4 +89,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Change of URL completed for $app" --last ynh_script_progression --message="Change of URL completed for AgenDAV" --last

View file

@ -13,7 +13,6 @@ source /usr/share/yunohost/helpers
# MANAGE SCRIPT FAILURE # MANAGE SCRIPT FAILURE
#================================================= #=================================================
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors ynh_abort_if_errors
#================================================= #=================================================
@ -53,7 +52,7 @@ then
caldav_app=radicale caldav_app=radicale
caldav_baseurl=/ caldav_baseurl=/
else else
ynh_die --message="Please install Baikal or Radicale before AgenDAV." ynh_die --message="Please install Baïkal or Radicale before AgenDAV."
fi fi
#================================================= #=================================================
@ -86,9 +85,9 @@ ynh_setup_source --dest_dir="$final_path"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Configuring nginx web server..." --weight=3 ynh_script_progression --message="Configuring NGINX web server..." --weight=3
# Copy and set nginx configuration # Copy and set NGINX configuration
ynh_add_nginx_config ynh_add_nginx_config
#================================================= #=================================================
@ -102,9 +101,9 @@ ynh_system_user_create --username=$app
#================================================= #=================================================
# PHP-FPM CONFIGURATION # PHP-FPM CONFIGURATION
#================================================ #================================================
ynh_script_progression --message="Configuring php-fpm..." ynh_script_progression --message="Configuring PHP-FPM.."
# Copy and set php-fpm configuration # Copy and set PHP-FPM configuration
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies"
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
@ -113,7 +112,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
# CREATE SETTINGS.PHP # CREATE SETTINGS.PHP
#================================================= #=================================================
ynh_script_progression --message="Configuring agendav..." --weight=2 ynh_script_progression --message="Configuring AgenDAV..." --weight=2
# Generate random encryption key # Generate random encryption key
encryptkey=$(ynh_string_random --length=24) encryptkey=$(ynh_string_random --length=24)
@ -151,7 +150,7 @@ ynh_store_file_checksum --file="$conf_path"
#================================================= #=================================================
# RUN DATABASE MIGRATIONS (INCLUDES INITIALIZATION) # RUN DATABASE MIGRATIONS (INCLUDES INITIALIZATION)
#================================================= #=================================================
ynh_script_progression --message="Initialising agendav..." --weight=3 ynh_script_progression --message="Initialising AgenDAV..." --weight=3
( (
cd $final_path cd $final_path
@ -188,7 +187,7 @@ chmod -R 750 ${final_path}/web/config/
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading nginx web server..." ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
@ -196,4 +195,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Installation of $app completed" --last ynh_script_progression --message="Installation of AgenDAV completed" --last

View file

@ -31,7 +31,7 @@ ynh_mysql_remove_db --db_user=$db_name --db_name=$db_name
#================================================= #=================================================
# REMOVE APP MAIN DIR # REMOVE APP MAIN DIR
#================================================= #=================================================
ynh_script_progression --message="Removing app main directory..." --weight=2 ynh_script_progression --message="Removing AgenDAV main directory..." --weight=2
# Remove the app directory securely # Remove the app directory securely
ynh_secure_remove --file="$final_path" ynh_secure_remove --file="$final_path"
@ -48,7 +48,7 @@ ynh_secure_remove --file="/var/log/$app"
#================================================= #=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." ynh_script_progression --message="Removing NGINX web server configuration..."
# Remove the dedicated nginx config # Remove the dedicated NGINX config
ynh_remove_nginx_config ynh_remove_nginx_config
#================================================= #=================================================
@ -81,4 +81,4 @@ ynh_system_user_delete --username=$app
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Removal of $app completed" --last ynh_script_progression --message="Removal of AgenDAV completed" --last

View file

@ -49,7 +49,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
# RESTORE THE APP MAIN DIR # RESTORE THE APP MAIN DIR
#================================================= #=================================================
ynh_script_progression --message="Restoring the app main directory..." ynh_script_progression --message="Restoring AgenDAV main directory..."
ynh_restore_file --origin_path="$final_path" ynh_restore_file --origin_path="$final_path"
@ -119,4 +119,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Restoration completed for $app" --last ynh_script_progression --message="Restoration completed for AgenDAV" --last

View file

@ -75,13 +75,13 @@ then
caldav_app=radicale caldav_app=radicale
caldav_baseurl=/ caldav_baseurl=/
else else
ynh_die --message="Please install Baikal or Radicale before AgenDAV." ynh_die --message="Please install Baïkal or Radicale before AgenDAV."
fi fi
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=9 ynh_script_progression --message="Backing up AgenDAV before upgrading (may take a while)..." --weight=9
# Backup the current version of the app # Backup the current version of the app
ynh_backup_before_upgrade ynh_backup_before_upgrade
@ -116,9 +116,9 @@ fi
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=2 ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
# Copy and set nginx configuration # Copy and set NGINX configuration
ynh_add_nginx_config ynh_add_nginx_config
#================================================= #=================================================
@ -134,7 +134,7 @@ ynh_system_user_create --username=$app
#================================================= #=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..." ynh_script_progression --message="Upgrading PHP-FPM configuration..."
# Create a dedicated php-fpm config # Create a dedicated PHP-FPM config
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies"
#================================================= #=================================================
@ -142,7 +142,7 @@ ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependenc
#================================================= #=================================================
# CREATE SETTINGS.PHP # CREATE SETTINGS.PHP
#================================================= #=================================================
ynh_script_progression --message="Upgrading agendav configuration..." --weight=2 ynh_script_progression --message="Upgrading AgenDAV configuration..." --weight=2
# Generate random encryption key # Generate random encryption key
encryptkey=$(ynh_app_setting_get --app=$app --key=encryptkey) encryptkey=$(ynh_app_setting_get --app=$app --key=encryptkey)
@ -182,7 +182,7 @@ ynh_store_file_checksum --file="$conf_path"
#================================================= #=================================================
# RUN DATABASE MIGRATIONS (INCLUDES INITIALIZATION) # RUN DATABASE MIGRATIONS (INCLUDES INITIALIZATION)
#================================================= #=================================================
ynh_script_progression --message="Upgrading agendav..." ynh_script_progression --message="Upgrading AgenDAV..."
( (
cd $final_path cd $final_path
@ -227,4 +227,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Upgrade of $app completed" --last ynh_script_progression --message="Upgrade of AgenDAV completed" --last