mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Merge branch 'testing' into manage-oldstable-version
This commit is contained in:
commit
3ca78a23c6
12 changed files with 31 additions and 44 deletions
|
@ -23,7 +23,7 @@ In the context of YunoHost, Nextcloud integrates with the SSO / user portal (Yun
|
||||||
The `/.well-known` address will be automatically configured for CalDAV and CardDAV synchronization if no other service such as Baïkal is already using it.
|
The `/.well-known` address will be automatically configured for CalDAV and CardDAV synchronization if no other service such as Baïkal is already using it.
|
||||||
|
|
||||||
|
|
||||||
**Shipped version:** 29.0.4~ynh1
|
**Shipped version:** 29.0.5~ynh1
|
||||||
|
|
||||||
**Demo:** <https://demo.nextcloud.com/>
|
**Demo:** <https://demo.nextcloud.com/>
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ In the context of YunoHost, Nextcloud integrates with the SSO / user portal (Yun
|
||||||
The `/.well-known` address will be automatically configured for CalDAV and CardDAV synchronization if no other service such as Baïkal is already using it.
|
The `/.well-known` address will be automatically configured for CalDAV and CardDAV synchronization if no other service such as Baïkal is already using it.
|
||||||
|
|
||||||
|
|
||||||
**Versión actual:** 29.0.4~ynh1
|
**Versión actual:** 29.0.5~ynh1
|
||||||
|
|
||||||
**Demo:** <https://demo.nextcloud.com/>
|
**Demo:** <https://demo.nextcloud.com/>
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ In the context of YunoHost, Nextcloud integrates with the SSO / user portal (Yun
|
||||||
The `/.well-known` address will be automatically configured for CalDAV and CardDAV synchronization if no other service such as Baïkal is already using it.
|
The `/.well-known` address will be automatically configured for CalDAV and CardDAV synchronization if no other service such as Baïkal is already using it.
|
||||||
|
|
||||||
|
|
||||||
**Paketatutako bertsioa:** 29.0.4~ynh1
|
**Paketatutako bertsioa:** 29.0.5~ynh1
|
||||||
|
|
||||||
**Demoa:** <https://demo.nextcloud.com/>
|
**Demoa:** <https://demo.nextcloud.com/>
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ Dans le cadre de YunoHost, Nextcloud s'intègre avec le SSO / portail utilisateu
|
||||||
L'adresse `/.well-known` sera automatiquement configuré pour la synchronisation CalDAV et CardDAV si aucun autre service tel que Baïkal ne l'utilise déjà.
|
L'adresse `/.well-known` sera automatiquement configuré pour la synchronisation CalDAV et CardDAV si aucun autre service tel que Baïkal ne l'utilise déjà.
|
||||||
|
|
||||||
|
|
||||||
**Version incluse :** 29.0.4~ynh1
|
**Version incluse :** 29.0.5~ynh1
|
||||||
|
|
||||||
**Démo :** <https://demo.nextcloud.com/>
|
**Démo :** <https://demo.nextcloud.com/>
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ In the context of YunoHost, Nextcloud integrates with the SSO / user portal (Yun
|
||||||
The `/.well-known` address will be automatically configured for CalDAV and CardDAV synchronization if no other service such as Baïkal is already using it.
|
The `/.well-known` address will be automatically configured for CalDAV and CardDAV synchronization if no other service such as Baïkal is already using it.
|
||||||
|
|
||||||
|
|
||||||
**Versión proporcionada:** 29.0.4~ynh1
|
**Versión proporcionada:** 29.0.5~ynh1
|
||||||
|
|
||||||
**Demo:** <https://demo.nextcloud.com/>
|
**Demo:** <https://demo.nextcloud.com/>
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ In the context of YunoHost, Nextcloud integrates with the SSO / user portal (Yun
|
||||||
The `/.well-known` address will be automatically configured for CalDAV and CardDAV synchronization if no other service such as Baïkal is already using it.
|
The `/.well-known` address will be automatically configured for CalDAV and CardDAV synchronization if no other service such as Baïkal is already using it.
|
||||||
|
|
||||||
|
|
||||||
**Versi terkirim:** 29.0.4~ynh1
|
**Versi terkirim:** 29.0.5~ynh1
|
||||||
|
|
||||||
**Demo:** <https://demo.nextcloud.com/>
|
**Demo:** <https://demo.nextcloud.com/>
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ In the context of YunoHost, Nextcloud integrates with the SSO / user portal (Yun
|
||||||
The `/.well-known` address will be automatically configured for CalDAV and CardDAV synchronization if no other service such as Baïkal is already using it.
|
The `/.well-known` address will be automatically configured for CalDAV and CardDAV synchronization if no other service such as Baïkal is already using it.
|
||||||
|
|
||||||
|
|
||||||
**Поставляемая версия:** 29.0.4~ynh1
|
**Поставляемая версия:** 29.0.5~ynh1
|
||||||
|
|
||||||
**Демо-версия:** <https://demo.nextcloud.com/>
|
**Демо-версия:** <https://demo.nextcloud.com/>
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ In the context of YunoHost, Nextcloud integrates with the SSO / user portal (Yun
|
||||||
The `/.well-known` address will be automatically configured for CalDAV and CardDAV synchronization if no other service such as Baïkal is already using it.
|
The `/.well-known` address will be automatically configured for CalDAV and CardDAV synchronization if no other service such as Baïkal is already using it.
|
||||||
|
|
||||||
|
|
||||||
**分发版本:** 29.0.4~ynh1
|
**分发版本:** 29.0.5~ynh1
|
||||||
|
|
||||||
**演示:** <https://demo.nextcloud.com/>
|
**演示:** <https://demo.nextcloud.com/>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ name = "Nextcloud"
|
||||||
description.en = "Online storage, file sharing platform and various other applications"
|
description.en = "Online storage, file sharing platform and various other applications"
|
||||||
description.fr = "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications"
|
description.fr = "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications"
|
||||||
|
|
||||||
version = "29.0.4~ynh1"
|
version = "29.0.5~ynh1"
|
||||||
|
|
||||||
maintainers = ["kay0u"]
|
maintainers = ["kay0u"]
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ code = "https://github.com/nextcloud/server"
|
||||||
cpe = "cpe:2.3:a:nextcloud:nextcloud"
|
cpe = "cpe:2.3:a:nextcloud:nextcloud"
|
||||||
|
|
||||||
[integration]
|
[integration]
|
||||||
yunohost = ">= 11.2"
|
yunohost = ">= 11.2.27"
|
||||||
architectures = ["amd64", "arm64", "armhf"]
|
architectures = ["amd64", "arm64", "armhf"]
|
||||||
multi_instance = true
|
multi_instance = true
|
||||||
|
|
||||||
|
@ -71,8 +71,8 @@ ram.runtime = "512M"
|
||||||
[resources.sources]
|
[resources.sources]
|
||||||
|
|
||||||
[resources.sources.main]
|
[resources.sources.main]
|
||||||
url = 'https://download.nextcloud.com/server/releases/nextcloud-29.0.4.tar.bz2'
|
url = 'https://download.nextcloud.com/server/releases/nextcloud-29.0.5.tar.bz2'
|
||||||
sha256 = '19c469e264b31ee80400f8396460854546569e88db4c15fc0854e192f96027eb'
|
sha256 = 'c7fe9c61e5ec30a5e599e8f152a1825df684d30e899db0caa8868c8d67b53a2c'
|
||||||
|
|
||||||
[resources.sources.28]
|
[resources.sources.28]
|
||||||
url = 'https://download.nextcloud.com/server/releases/nextcloud-28.0.8.tar.bz2'
|
url = 'https://download.nextcloud.com/server/releases/nextcloud-28.0.8.tar.bz2'
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
wait_nginx_reload() {
|
wait_nginx_reload() {
|
||||||
# Nginx may take some time to support the new configuration,
|
# NGINX may take some time to support the new configuration,
|
||||||
# wait for the nextcloud configuration file to disappear from nginx before checking the CalDAV/CardDAV URL.
|
# wait for the Nextcloud configuration file to disappear from NGINX before checking the CalDAV/CardDAV URL.
|
||||||
timeout=30
|
timeout=30
|
||||||
for i in $(seq 1 $timeout); do
|
for i in $(seq 1 $timeout); do
|
||||||
if ! ynh_exec_warn_less nginx -T | grep --quiet "# configuration file /etc/nginx/conf.d/$domain.d/$app.conf:"; then
|
if ! ynh_exec_warn_less nginx -T | grep --quiet "# configuration file /etc/nginx/conf.d/$domain.d/$app.conf:"; then
|
||||||
|
@ -18,9 +18,10 @@ wait_nginx_reload() {
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
# Wait untils NGINX has fully reloaded (avoid cURL fail with http2)
|
||||||
|
sleep 2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Check if an URL is already handled
|
# Check if an URL is already handled
|
||||||
# usage: is_url_handled --domain=DOMAIN --path=PATH_URI
|
# usage: is_url_handled --domain=DOMAIN --path=PATH_URI
|
||||||
is_url_handled() {
|
is_url_handled() {
|
||||||
|
@ -32,22 +33,22 @@ is_url_handled() {
|
||||||
# Manage arguments with getopts
|
# Manage arguments with getopts
|
||||||
ynh_handle_getopts_args "$@"
|
ynh_handle_getopts_args "$@"
|
||||||
|
|
||||||
# Try to get the url with curl, and keep the http code and an eventual redirection url.
|
# Try to get the URL with cURL, and keep the http code and an eventual redirection URL.
|
||||||
local curl_output="$(curl --insecure --silent --output /dev/null \
|
local curl_output="$(curl --insecure --silent --output /dev/null \
|
||||||
--write-out '%{http_code};%{redirect_url}' https://127.0.0.1$path --header "Host: $domain" --resolve $domain:443:127.0.0.1)"
|
--write-out '%{http_code};%{redirect_url}' https://127.0.0.1$path --header "Host: $domain" --resolve $domain:443:127.0.0.1)"
|
||||||
|
|
||||||
# Cut the output and keep only the first part to keep the http code
|
# Cut the output and keep only the first part to keep the http code
|
||||||
local http_code="${curl_output%%;*}"
|
local http_code="${curl_output%%;*}"
|
||||||
# Do the same thing but keep the second part, the redirection url
|
# Do the same thing but keep the second part, the redirection URL
|
||||||
local redirection="${curl_output#*;}"
|
local redirection="${curl_output#*;}"
|
||||||
|
|
||||||
# Return 1 if the url isn't handled.
|
# Return 1 if the URL isn't handled.
|
||||||
# Which means either curl got a 404 (or the admin) or the sso.
|
# Which means either cURL got a 404 (or the admin) or the SSO.
|
||||||
# A handled url should redirect to a publicly accessible url.
|
# A handled URL should redirect to a publicly accessible URL.
|
||||||
# Return 1 if the url has returned 404
|
# Return 1 if the URL has returned 404
|
||||||
if [ "$http_code" = "404" ] || [[ $redirection =~ "/yunohost/admin" ]]; then
|
if [ "$http_code" = "404" ] || [[ $redirection =~ "/yunohost/admin" ]]; then
|
||||||
return 1
|
return 1
|
||||||
# Return 1 if the url is redirected to the SSO
|
# Return 1 if the URL is redirected to the SSO
|
||||||
elif [[ $redirection =~ "/yunohost/sso" ]]; then
|
elif [[ $redirection =~ "/yunohost/sso" ]]; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -28,42 +28,28 @@ ynh_backup --src_path="$install_dir"
|
||||||
ynh_backup --src_path="$data_dir" --is_big
|
ynh_backup --src_path="$data_dir" --is_big
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE NGINX CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# BACKUP THE PHP-FPM CONFIGURATION
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
# Backup the PHP-FPM configuration
|
||||||
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
# Backup the nginx configuration
|
||||||
# SPECIFIC BACKUP
|
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
#=================================================
|
|
||||||
# BACKUP LOGROTATE
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
|
# Backup the logrotate configuration
|
||||||
ynh_backup --src_path="/etc/logrotate.d/$app"
|
ynh_backup --src_path="/etc/logrotate.d/$app"
|
||||||
|
|
||||||
#=================================================
|
# Backup the Fail2Ban config
|
||||||
# BACKUP 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"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE CRON FILE
|
# BACKUP VARIOUS FILES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/cron.d/$app"
|
ynh_backup --src_path="/etc/cron.d/$app"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# BACKUP LOGS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_backup --src_path="/var/log/$app"
|
ynh_backup --src_path="/var/log/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -48,7 +48,7 @@ then
|
||||||
# Change hostname for activity notifications
|
# Change hostname for activity notifications
|
||||||
exec_occ config:system:set overwrite.cli.url --value="https://${new_domain}${new_path}"
|
exec_occ config:system:set overwrite.cli.url --value="https://${new_domain}${new_path}"
|
||||||
|
|
||||||
# Reload php fpm, necessary for force nextcloud to re-read config.php, cf opcache.revalidate_freq
|
# Reload PHP-FPM, necessary for force Nextcloud to re-read config.php, cf opcache.revalidate_freq
|
||||||
ynh_systemd_action --service_name=php${phpversion}-fpm --action=reload
|
ynh_systemd_action --service_name=php${phpversion}-fpm --action=reload
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue