mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Merge pull request #333 from ericgaspar/Upgrade-to-version-19.0.3
Upgrade to version 19.0.3
This commit is contained in:
commit
a03e25fac4
11 changed files with 52 additions and 54 deletions
|
@ -14,7 +14,7 @@ own data. A personal cloud which runs on your own server. With Nextcloud
|
||||||
you can synchronize your files over your devices.
|
you can synchronize your files over your devices.
|
||||||
|
|
||||||
|
|
||||||
**Shipped version:** 19.0.2
|
**Shipped version:** 19.0.3
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
[Nextcloud](https://nextcloud.com) vous donne la liberté et le contrôle sur vos données. Un nuage personnel qui tourne sur votre serveur.
|
[Nextcloud](https://nextcloud.com) vous donne la liberté et le contrôle sur vos données. Un nuage personnel qui tourne sur votre serveur.
|
||||||
Avec NextCloud vous pouvez synchroniser vos fichiers sur vos appareils.
|
Avec NextCloud vous pouvez synchroniser vos fichiers sur vos appareils.
|
||||||
|
|
||||||
**Version incluse :** 19.0.2
|
**Version incluse :** 19.0.3
|
||||||
|
|
||||||
## Captures d'écran
|
## Captures d'écran
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
setup_private=0
|
setup_private=0
|
||||||
setup_public=0
|
setup_public=0
|
||||||
upgrade=1
|
upgrade=1
|
||||||
upgrade=1 from_commit=9c57c2f78f3da979d587d708eb9379ffaa41bcfa
|
upgrade=1 from_commit=c864e086625363d91dde6ba78a652011a991a027
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
incorrect_path=1
|
incorrect_path=1
|
||||||
|
@ -24,6 +24,6 @@
|
||||||
Email=
|
Email=
|
||||||
Notification=none
|
Notification=none
|
||||||
;;; Upgrade options
|
;;; Upgrade options
|
||||||
; commit=9c57c2f78f3da979d587d708eb9379ffaa41bcfa
|
; commit=c864e086625363d91dde6ba78a652011a991a027
|
||||||
name=Do not use too much process for php (#247)
|
name=[fix] php7.2-mcrypt doesn't exist (#253)
|
||||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&user_home=1&
|
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&user_home=1&
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Access & share your files, calendars, contacts, mail & more from any device, on your terms",
|
"en": "Access & share your files, calendars, contacts, mail & more from any device, on your terms",
|
||||||
"fr": "Consultez et partagez vos fichiers, agendas, carnets d'adresses, emails et bien plus depuis les appareils de votre choix, sous vos conditions"
|
"fr": "Consultez et partagez vos fichiers, agendas, carnets d'adresses, emails et bien plus depuis les appareils de votre choix, sous vos conditions"
|
||||||
},
|
},
|
||||||
"version": "19.0.2~ynh1",
|
"version": "19.0.3~ynh1",
|
||||||
"url": "https://nextcloud.com",
|
"url": "https://nextcloud.com",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
|
@ -19,7 +19,7 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
# LOAD SETTINGS
|
# LOAD SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Loading installation settings..."
|
ynh_print_info --message="Loading installation settings..."
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
|
@ -28,32 +28,32 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD BACKUP STEPS
|
# 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_script_progression --message="Backing up the main app directory..."
|
|
||||||
|
|
||||||
ynh_backup --src_path="$final_path"
|
ynh_backup --src_path="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE NGINX CONFIGURATION
|
# BACKUP THE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Backing up nginx web server configuration..."
|
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE PHP-FPM CONFIGURATION
|
# BACKUP THE PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Backing up php-fpm configuration..."
|
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf"
|
ynh_backup --src_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE MYSQL DATABASE
|
# BACKUP THE MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Backing up the MySQL database..." --weight=2
|
ynh_print_info --message="Backing up the MySQL database..."
|
||||||
|
|
||||||
ynh_mysql_dump_db --database="$db_name" > db.sql
|
ynh_mysql_dump_db --database="$db_name" > db.sql
|
||||||
|
|
||||||
|
@ -62,14 +62,12 @@ ynh_mysql_dump_db --database="$db_name" > db.sql
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP LOGROTATE
|
# BACKUP LOGROTATE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Backing up logrotate configuration..."
|
|
||||||
|
|
||||||
ynh_backup "/etc/logrotate.d/$app"
|
ynh_backup "/etc/logrotate.d/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP FAIL2BAN CONFIGURATION
|
# BACKUP FAIL2BAN CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Backing up fail2ban configuration..."
|
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
|
ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
|
||||||
ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
|
ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
|
||||||
|
@ -83,7 +81,7 @@ ynh_backup --src_path="/etc/cron.d/$app"
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE DATA DIRECTORY
|
# BACKUP THE DATA DIRECTORY
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Backing up data directory..."
|
ynh_print_info --message="Backing up data directory..."
|
||||||
|
|
||||||
ynh_backup --src_path="/home/yunohost.app/${app}/data" --is_big
|
ynh_backup --src_path="/home/yunohost.app/${app}/data" --is_big
|
||||||
|
|
||||||
|
@ -91,4 +89,4 @@ ynh_backup --src_path="/home/yunohost.app/${app}/data" --is_big
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last
|
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||||
|
|
|
@ -50,23 +50,23 @@ 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
|
||||||
|
|
||||||
# Change the path in the nginx config file
|
# Change the path in the NGINX config file
|
||||||
if [ $change_path -eq 1 ]
|
if [ $change_path -eq 1 ]
|
||||||
then
|
then
|
||||||
# Make a backup of the original nginx config file if modified
|
# Make a backup of the original NGINX config file if modified
|
||||||
ynh_backup_if_checksum_is_different --file="$nginx_conf_path"
|
ynh_backup_if_checksum_is_different --file="$nginx_conf_path"
|
||||||
# Set global variables for nginx helper
|
# Set global variables for NGINX helper
|
||||||
domain="$old_domain"
|
domain="$old_domain"
|
||||||
path_url="$new_path"
|
path_url="$new_path"
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config YNH_PHP_VERSION
|
ynh_add_nginx_config YNH_PHP_VERSION
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Change the domain for nginx
|
# Change the domain for NGINX
|
||||||
if [ $change_domain -eq 1 ]
|
if [ $change_domain -eq 1 ]
|
||||||
then
|
then
|
||||||
# Delete file checksum for the old conf file location
|
# Delete file checksum for the old conf file location
|
||||||
|
@ -114,7 +114,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
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ ynh_setup_source --dest_dir="$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring nginx web server..." --weight=2
|
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
||||||
|
|
||||||
# Check if .well-known is available for this domain
|
# Check if .well-known is available for this domain
|
||||||
if is_url_handled --domain="$domain" --path="/.well-known/caldav" || is_url_handled --domain="$domain" --path="/.well-known/carddav"
|
if is_url_handled --domain="$domain" --path="/.well-known/caldav" || is_url_handled --domain="$domain" --path="/.well-known/carddav"
|
||||||
|
@ -98,7 +98,7 @@ then
|
||||||
sed --in-place --regexp-extended '/^location = \/\.well\-known\/(caldav|carddav) \{/,/\}/d' "../conf/nginx.conf"
|
sed --in-place --regexp-extended '/^location = \/\.well\-known\/(caldav|carddav) \{/,/\}/d' "../conf/nginx.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config YNH_PHP_VERSION
|
ynh_add_nginx_config YNH_PHP_VERSION
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -112,7 +112,7 @@ ynh_system_user_create --username=$app
|
||||||
#=================================================
|
#=================================================
|
||||||
# PHP-FPM CONFIGURATION
|
# PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring php-fpm..." --weight=50
|
ynh_script_progression --message="Configuring PHP-FPM..." --weight=50
|
||||||
|
|
||||||
# Create a dedicated php-fpm config
|
# Create a dedicated php-fpm config
|
||||||
ynh_add_fpm_config --usage=medium --footprint=high --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies"
|
ynh_add_fpm_config --usage=medium --footprint=high --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies"
|
||||||
|
@ -131,7 +131,7 @@ mkdir -p "$datadir"
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL NEXTCLOUD
|
# INSTALL NEXTCLOUD
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing nextcloud..." --weight=30
|
ynh_script_progression --message="Installing Nextcloud..." --weight=30
|
||||||
|
|
||||||
# Define a function to execute commands with `occ`
|
# Define a function to execute commands with `occ`
|
||||||
exec_occ() {
|
exec_occ() {
|
||||||
|
@ -153,7 +153,7 @@ exec_occ maintenance:install \
|
||||||
#=================================================
|
#=================================================
|
||||||
# CONFIGURE NEXTCLOUD
|
# CONFIGURE NEXTCLOUD
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring nextcloud..." --weight=8
|
ynh_script_progression --message="Configuring Nextcloud..." --weight=8
|
||||||
|
|
||||||
# Ensure that UpdateNotification app is disabled
|
# Ensure that UpdateNotification app is disabled
|
||||||
exec_occ app:disable updatenotification
|
exec_occ app:disable updatenotification
|
||||||
|
@ -162,7 +162,7 @@ exec_occ app:disable updatenotification
|
||||||
exec_occ app:enable user_ldap
|
exec_occ app:enable user_ldap
|
||||||
exec_occ ldap:create-empty-config
|
exec_occ ldap:create-empty-config
|
||||||
|
|
||||||
# Load the installation config file in nextcloud
|
# Load the installation config file in Nextcloud
|
||||||
nc_conf="$final_path/config_install.json"
|
nc_conf="$final_path/config_install.json"
|
||||||
cp ../conf/config_install.json "$nc_conf"
|
cp ../conf/config_install.json "$nc_conf"
|
||||||
|
|
||||||
|
@ -327,9 +327,9 @@ ynh_use_logrotate --logfile="$datadir/nextcloud.log"
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP FAIL2BAN
|
# SETUP FAIL2BAN
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring fail2ban..." --weight=8
|
ynh_script_progression --message="Configuring Fail2ban..." --weight=8
|
||||||
|
|
||||||
# Create a dedicated fail2ban config
|
# Create a dedicated Fail2ban config
|
||||||
ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: '<HOST>'.*$" --max_retry=5
|
ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: '<HOST>'.*$" --max_retry=5
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -344,7 +344,7 @@ ynh_app_setting_set --app=$app --key=skipped_regex \
|
||||||
#=================================================
|
#=================================================
|
||||||
# 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
|
||||||
|
|
||||||
|
|
|
@ -49,17 +49,17 @@ ynh_secure_remove --file="$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE NGINX CONFIGURATION
|
# REMOVE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
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
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE PHP-FPM CONFIGURATION
|
# REMOVE PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing php-fpm configuration..." --weight=2
|
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2
|
||||||
|
|
||||||
# Remove the dedicated php-fpm config
|
# Remove the dedicated PHP-FPM config
|
||||||
ynh_remove_fpm_config
|
ynh_remove_fpm_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -73,9 +73,9 @@ ynh_remove_logrotate
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE FAIL2BAN CONFIGURATION
|
# REMOVE FAIL2BAN CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing fail2ban configuration..." --weight=8
|
ynh_script_progression --message="Removing Fail2ban configuration..." --weight=8
|
||||||
|
|
||||||
# Remove the dedicated fail2ban config
|
# Remove the dedicated Fail2ban config
|
||||||
ynh_remove_fail2ban_config
|
ynh_remove_fail2ban_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -95,7 +95,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
# RESTORE THE PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reconfiguring php-fpm..." --weight=50
|
ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=50
|
||||||
|
|
||||||
# Restore the file first, so it can have a backup if different
|
# Restore the file first, so it can have a backup if different
|
||||||
ynh_restore_file --origin_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf"
|
||||||
|
@ -156,7 +156,7 @@ ynh_multimedia_addaccess $app
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE FAIL2BAN CONFIGURATION
|
# RESTORE THE FAIL2BAN CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring the fail2ban configuration..." --weight=7
|
ynh_script_progression --message="Restoring the Fail2ban configuration..." --weight=7
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf"
|
||||||
ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
|
||||||
|
@ -175,7 +175,7 @@ ynh_systemd_action --action=restart --service_name=fail2ban
|
||||||
#=================================================
|
#=================================================
|
||||||
# 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
|
||||||
|
|
||||||
|
|
|
@ -143,7 +143,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
||||||
#=================================================
|
#=================================================
|
||||||
# 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
|
||||||
|
|
||||||
ynh_backup_if_checksum_is_different --file="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_backup_if_checksum_is_different --file="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ ynh_system_user_create --username=$app
|
||||||
#=================================================
|
#=================================================
|
||||||
# PHP-FPM CONFIGURATION
|
# PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading php-fpm configuration..." --weight=2
|
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
|
||||||
|
|
||||||
# Recreate a dedicated php-fpm config
|
# Recreate a dedicated php-fpm config
|
||||||
ynh_add_fpm_config --phpversion="$YNH_PHP_VERSION" --usage=$fpm_usage --footprint=$fpm_footprint --package="$extra_php_dependencies"
|
ynh_add_fpm_config --phpversion="$YNH_PHP_VERSION" --usage=$fpm_usage --footprint=$fpm_footprint --package="$extra_php_dependencies"
|
||||||
|
@ -223,7 +223,7 @@ datadir="/home/yunohost.app/$app/data"
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading nextcloud..." --weight=3
|
ynh_script_progression --message="Upgrading Nextcloud..." --weight=3
|
||||||
|
|
||||||
# Load the last available version
|
# Load the last available version
|
||||||
source upgrade.d/upgrade.last.sh
|
source upgrade.d/upgrade.last.sh
|
||||||
|
@ -234,7 +234,7 @@ then
|
||||||
# Set write access for the following commands
|
# Set write access for the following commands
|
||||||
chown -R $app: "$final_path" "$datadir"
|
chown -R $app: "$final_path" "$datadir"
|
||||||
|
|
||||||
# Print the current version number of nextcloud
|
# Print the current version number of Nextcloud
|
||||||
exec_occ -V
|
exec_occ -V
|
||||||
|
|
||||||
# While the current version is not the last version, do an upgrade
|
# While the current version is not the last version, do an upgrade
|
||||||
|
@ -257,7 +257,7 @@ then
|
||||||
|
|
||||||
ynh_print_info --message="Upgrade to nextcloud $next_version"
|
ynh_print_info --message="Upgrade to nextcloud $next_version"
|
||||||
|
|
||||||
# Create an app.src for this version of nextcloud
|
# Create an app.src for this version of Nextcloud
|
||||||
cp ../conf/app.src.default ../conf/app.src
|
cp ../conf/app.src.default ../conf/app.src
|
||||||
ynh_replace_string --match_string="__VERSION__" --replace_string="$next_version" --target_file="../conf/app.src"
|
ynh_replace_string --match_string="__VERSION__" --replace_string="$next_version" --target_file="../conf/app.src"
|
||||||
ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$nextcloud_source_sha256" --target_file="../conf/app.src"
|
ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$nextcloud_source_sha256" --target_file="../conf/app.src"
|
||||||
|
@ -274,7 +274,7 @@ then
|
||||||
# Backup the config file in the temp dir
|
# Backup the config file in the temp dir
|
||||||
cp -a "$final_path/config/config.php" "$tmpdir/config/config.php"
|
cp -a "$final_path/config/config.php" "$tmpdir/config/config.php"
|
||||||
|
|
||||||
# Backup 3rd party applications from the current nextcloud
|
# Backup 3rd party applications from the current Nextcloud
|
||||||
# But do not overwrite if there is any upgrade
|
# But do not overwrite if there is any upgrade
|
||||||
# (apps directory already exists in Nextcloud archive)
|
# (apps directory already exists in Nextcloud archive)
|
||||||
(
|
(
|
||||||
|
@ -319,7 +319,7 @@ then
|
||||||
#=================================================
|
#=================================================
|
||||||
# CONFIGURE NEXTCLOUD
|
# CONFIGURE NEXTCLOUD
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reconfiguring nextcloud..." --weight=9
|
ynh_script_progression --message="Reconfiguring Nextcloud..." --weight=9
|
||||||
|
|
||||||
# Verify the checksum and backup the file if it's different
|
# Verify the checksum and backup the file if it's different
|
||||||
ynh_backup_if_checksum_is_different --file="$final_path/config/config.php"
|
ynh_backup_if_checksum_is_different --file="$final_path/config/config.php"
|
||||||
|
@ -445,9 +445,9 @@ ynh_use_logrotate --non-append
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP FAIL2BAN
|
# SETUP FAIL2BAN
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reconfiguring fail2ban..." --weight=7
|
ynh_script_progression --message="Reconfiguring Fail2ban..." --weight=7
|
||||||
|
|
||||||
# Create a dedicated fail2ban config
|
# Create a dedicated Fail2ban config
|
||||||
ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: '<HOST>'.*$" --max_retry=5
|
ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: '<HOST>'.*$" --max_retry=5
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -464,7 +464,7 @@ ynh_app_setting_set --app=$app --key=skipped_regex \
|
||||||
#=================================================
|
#=================================================
|
||||||
# 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
|
||||||
|
|
||||||
|
@ -474,7 +474,7 @@ ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
if [ $migration_process -eq 1 ]
|
if [ $migration_process -eq 1 ]
|
||||||
then
|
then
|
||||||
ynh_print_info --message="ownCloud has been successfully migrated to Nextcloud! \
|
ynh_print_info --message="OwnCloud has been successfully migrated to Nextcloud! \
|
||||||
A last scheduled operation will run in a couple of minutes to finish the \
|
A last scheduled operation will run in a couple of minutes to finish the \
|
||||||
migration in YunoHost side. Do not proceed any application operation while \
|
migration in YunoHost side. Do not proceed any application operation while \
|
||||||
you don't see Nextcloud as installed."
|
you don't see Nextcloud as installed."
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Last available nextcloud version
|
# Last available nextcloud version
|
||||||
next_version="19.0.2"
|
next_version="19.0.3"
|
||||||
|
|
||||||
# Nextcloud tarball checksum sha256
|
# Nextcloud tarball checksum sha256
|
||||||
nextcloud_source_sha256="8152f385fdb0645114e0043aaf07b0de046fbaf205fa6d6bf530d22db86c66a5"
|
nextcloud_source_sha256="fc503985e8aa4ed795d882e35679e0e1b7670181768e7820307222d8b4658969"
|
||||||
|
|
Loading…
Add table
Reference in a new issue