mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Merge branch 'testing' into pr/541
This commit is contained in:
commit
609973ab34
21 changed files with 167 additions and 201 deletions
18
README.md
18
README.md
|
@ -6,6 +6,7 @@ It shall NOT be edited by hand.
|
||||||
# Nextcloud for YunoHost
|
# Nextcloud for YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/nextcloud)  
|
[](https://dash.yunohost.org/appci/app/nextcloud)  
|
||||||
|
|
||||||
[](https://install-app.yunohost.org/?app=nextcloud)
|
[](https://install-app.yunohost.org/?app=nextcloud)
|
||||||
|
|
||||||
*[Lire ce readme en français.](./README_fr.md)*
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
@ -17,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
|
|
||||||
Nextcloud Hub is a fully open-source on-premises content collaboration platform. Teams access, share and edit their documents, chat and participate in video calls and manage their mail and calendar and projects across mobile, desktop and web interfaces.
|
Nextcloud Hub is a fully open-source on-premises content collaboration platform. Teams access, share and edit their documents, chat and participate in video calls and manage their mail and calendar and projects across mobile, desktop and web interfaces.
|
||||||
|
|
||||||
### YunoHost features:
|
### YunoHost-specific features
|
||||||
|
|
||||||
In addition to Nextcloud core features, the following are made available with
|
In addition to Nextcloud core features, the following are made available with
|
||||||
this package:
|
this package:
|
||||||
|
@ -29,7 +30,7 @@ this package:
|
||||||
* Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal
|
* Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal
|
||||||
|
|
||||||
|
|
||||||
**Shipped version:** 25.0.3~ynh4
|
**Shipped version:** 27.1.2~ynh2
|
||||||
|
|
||||||
**Demo:** https://demo.nextcloud.com/
|
**Demo:** https://demo.nextcloud.com/
|
||||||
|
|
||||||
|
@ -56,25 +57,12 @@ To install and configure it:
|
||||||
|
|
||||||
For better performance and ARM64 support, install ONLYOFFICE YunoHost App and connect it to Nextcloud, see the tutorial in the [doc of onlyoffice_ynh package](https://github.com/YunoHost-Apps/onlyoffice_ynh/blob/master/README_fr.md#configuration-de-onlyoffice-server)
|
For better performance and ARM64 support, install ONLYOFFICE YunoHost App and connect it to Nextcloud, see the tutorial in the [doc of onlyoffice_ynh package](https://github.com/YunoHost-Apps/onlyoffice_ynh/blob/master/README_fr.md#configuration-de-onlyoffice-server)
|
||||||
|
|
||||||
|
|
||||||
## YunoHost specific features
|
|
||||||
|
|
||||||
In addition to Nextcloud core features, the following are made available with
|
|
||||||
this package:
|
|
||||||
|
|
||||||
* Integrate with YunoHost users and SSO - i.e. logout button
|
|
||||||
* Allow one user to be the administrator (set at the installation)
|
|
||||||
* Allow multiple instances of this application
|
|
||||||
* Optionally access the user home folder from Nextcloud files (set at the installation, the sharing is enabled by default)
|
|
||||||
* Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal
|
|
||||||
|
|
||||||
## Documentation and resources
|
## Documentation and resources
|
||||||
|
|
||||||
* Official app website: <https://nextcloud.com>
|
* Official app website: <https://nextcloud.com>
|
||||||
* Official user documentation: <https://docs.nextcloud.com/server/latest/user_manual/en/>
|
* Official user documentation: <https://docs.nextcloud.com/server/latest/user_manual/en/>
|
||||||
* Official admin documentation: <https://docs.nextcloud.com/server/stable/admin_manual/>
|
* Official admin documentation: <https://docs.nextcloud.com/server/stable/admin_manual/>
|
||||||
* Upstream app code repository: <https://github.com/nextcloud/server>
|
* Upstream app code repository: <https://github.com/nextcloud/server>
|
||||||
* YunoHost documentation for this app: <https://yunohost.org/app_nextcloud>
|
|
||||||
* Report a bug: <https://github.com/YunoHost-Apps/nextcloud_ynh/issues>
|
* Report a bug: <https://github.com/YunoHost-Apps/nextcloud_ynh/issues>
|
||||||
|
|
||||||
## Developer info
|
## Developer info
|
||||||
|
|
|
@ -6,6 +6,7 @@ It shall NOT be edited by hand.
|
||||||
# Nextcloud pour YunoHost
|
# Nextcloud pour YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/nextcloud)  
|
[](https://dash.yunohost.org/appci/app/nextcloud)  
|
||||||
|
|
||||||
[](https://install-app.yunohost.org/?app=nextcloud)
|
[](https://install-app.yunohost.org/?app=nextcloud)
|
||||||
|
|
||||||
*[Read this readme in english.](./README.md)*
|
*[Read this readme in english.](./README.md)*
|
||||||
|
@ -17,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
|
||||||
|
|
||||||
Nextcloud Hub est la plate-forme de collaboration de contenu sur site entièrement open source. Les équipes accèdent, partagent et modifient leurs documents, discutent et participent à des appels vidéo et gèrent leur courrier, leur calendrier et leurs projets sur des interfaces mobiles, de bureau et Web.
|
Nextcloud Hub est la plate-forme de collaboration de contenu sur site entièrement open source. Les équipes accèdent, partagent et modifient leurs documents, discutent et participent à des appels vidéo et gèrent leur courrier, leur calendrier et leurs projets sur des interfaces mobiles, de bureau et Web.
|
||||||
|
|
||||||
### Caractéristiques spécifiques YunoHost :
|
### Caractéristiques spécifiques YunoHost
|
||||||
|
|
||||||
En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suivantes sont incluses dans ce package :
|
En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suivantes sont incluses dans ce package :
|
||||||
|
|
||||||
|
@ -25,10 +26,10 @@ En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suiv
|
||||||
* Permet à un utilisateur d'être l'administrateur (choisi à l'installation)
|
* Permet à un utilisateur d'être l'administrateur (choisi à l'installation)
|
||||||
* Permet de multiples instances de cette application
|
* Permet de multiples instances de cette application
|
||||||
* Accès optionnel au répertoire home depuis les fichiers Nextcloud (à activer à l'installation, le partage étant activé par défaut)
|
* Accès optionnel au répertoire home depuis les fichiers Nextcloud (à activer à l'installation, le partage étant activé par défaut)
|
||||||
* Utilise l'adresse `/.well-known` pour la synchronisation CalDAV et CardDAV du domaine si aucun autre service ne l'utilise déjà - par exemple, baikal
|
* Utilise l'adresse `/.well-known` pour la synchronisation CalDAV et CardDAV du domaine si aucun autre service ne l'utilise déjà - par exemple, Baïkal
|
||||||
|
|
||||||
|
|
||||||
**Version incluse :** 25.0.3~ynh4
|
**Version incluse :** 27.1.2~ynh2
|
||||||
|
|
||||||
**Démo :** https://demo.nextcloud.com/
|
**Démo :** https://demo.nextcloud.com/
|
||||||
|
|
||||||
|
@ -61,7 +62,6 @@ Pour de meilleures performances et le support de ARM64, installez l'app YunoHos
|
||||||
* Documentation officielle utilisateur : <https://docs.nextcloud.com/server/latest/user_manual/en/>
|
* Documentation officielle utilisateur : <https://docs.nextcloud.com/server/latest/user_manual/en/>
|
||||||
* Documentation officielle de l’admin : <https://docs.nextcloud.com/server/stable/admin_manual/>
|
* Documentation officielle de l’admin : <https://docs.nextcloud.com/server/stable/admin_manual/>
|
||||||
* Dépôt de code officiel de l’app : <https://github.com/nextcloud/server>
|
* Dépôt de code officiel de l’app : <https://github.com/nextcloud/server>
|
||||||
* Documentation YunoHost pour cette app : <https://yunohost.org/app_nextcloud>
|
|
||||||
* Signaler un bug : <https://github.com/YunoHost-Apps/nextcloud_ynh/issues>
|
* Signaler un bug : <https://github.com/YunoHost-Apps/nextcloud_ynh/issues>
|
||||||
|
|
||||||
## Informations pour les développeurs
|
## Informations pour les développeurs
|
||||||
|
|
17
actions.toml
17
actions.toml
|
@ -1,17 +0,0 @@
|
||||||
[disable_maintenance]
|
|
||||||
name = "Disable the maintenance mode of Nextcloud"
|
|
||||||
command = "/bin/bash scripts/actions/disable_maintenance"
|
|
||||||
# user = "root" # optional
|
|
||||||
# cwd = "/" # optional
|
|
||||||
# accepted_return_codes = [0, 1, 2, 3] # optional
|
|
||||||
accepted_return_codes = [0]
|
|
||||||
description = "Disable the maintenance mode of Nextcloud if you're stuck after an upgrade"
|
|
||||||
|
|
||||||
[add_multimedia_directories]
|
|
||||||
name = "Add multimedia directories"
|
|
||||||
command = "/bin/bash scripts/actions/add_multimedia_directories"
|
|
||||||
# user = "root" # optional
|
|
||||||
# cwd = "/" # optional
|
|
||||||
# accepted_return_codes = [0, 1, 2, 3] # optional
|
|
||||||
accepted_return_codes = [0]
|
|
||||||
description = "Add the multimedia and shared multimedia directories again"
|
|
|
@ -13,8 +13,8 @@
|
||||||
setup_private=1
|
setup_private=1
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
#25.0.2
|
#26.0.3
|
||||||
upgrade=1 from_commit=c5cf91ad30149e1924c23b19e93f483c3ed3edd8
|
upgrade=1 from_commit=d02166a533dcf8aa82d49dbb6a3a2dd9a7411812
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
change_url=1
|
change_url=1
|
||||||
|
@ -22,6 +22,6 @@
|
||||||
Email=
|
Email=
|
||||||
Notification=none
|
Notification=none
|
||||||
;;; Upgrade options
|
;;; Upgrade options
|
||||||
; commit=c5cf91ad30149e1924c23b19e93f483c3ed3edd8
|
; commit=d02166a533dcf8aa82d49dbb6a3a2dd9a7411812
|
||||||
name=Merge pull request #495 from YunoHost-Apps/25.0.2
|
name=Merge pull request #495 from 26.0.3
|
||||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&user_home=1&
|
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&user_home=1&
|
||||||
|
|
|
@ -28,7 +28,7 @@ location ^~ __PATH__/ {
|
||||||
more_set_headers "X-Download-Options: noopen";
|
more_set_headers "X-Download-Options: noopen";
|
||||||
more_set_headers "X-Frame-Options: SAMEORIGIN";
|
more_set_headers "X-Frame-Options: SAMEORIGIN";
|
||||||
more_set_headers "X-Permitted-Cross-Domain-Policies: none";
|
more_set_headers "X-Permitted-Cross-Domain-Policies: none";
|
||||||
more_set_headers "X-Robots-Tag: none";
|
more_set_headers "X-Robots-Tag: noindex, nofollow";
|
||||||
more_set_headers "X-XSS-Protection: 1; mode=block";
|
more_set_headers "X-XSS-Protection: 1; mode=block";
|
||||||
|
|
||||||
# Set max upload size
|
# Set max upload size
|
||||||
|
@ -47,6 +47,11 @@ location ^~ __PATH__/ {
|
||||||
# with the `ngx_pagespeed` module, uncomment this line to disable it.
|
# with the `ngx_pagespeed` module, uncomment this line to disable it.
|
||||||
#pagespeed off;
|
#pagespeed off;
|
||||||
|
|
||||||
|
# The settings allows you to optimize the HTTP2 bandwitdth.
|
||||||
|
# See https://blog.cloudflare.com/delivering-http-2-upload-speed-improvements/
|
||||||
|
# for tunning hints
|
||||||
|
client_body_buffer_size 512k;
|
||||||
|
|
||||||
# Remove X-Powered-By, which is an information leak
|
# Remove X-Powered-By, which is an information leak
|
||||||
fastcgi_hide_header X-Powered-By;
|
fastcgi_hide_header X-Powered-By;
|
||||||
|
|
||||||
|
@ -77,7 +82,7 @@ location ^~ __PATH__/ {
|
||||||
|
|
||||||
# Rules borrowed from `.htaccess` to hide certain paths from clients
|
# Rules borrowed from `.htaccess` to hide certain paths from clients
|
||||||
location ~ ^__PATH__/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; }
|
location ~ ^__PATH__/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; }
|
||||||
location ~ ^__PATH__/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; }
|
location ~ ^__PATH__/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; }
|
||||||
|
|
||||||
# Ensure this block, which passes PHP files to the PHP process, is above the blocks
|
# Ensure this block, which passes PHP files to the PHP process, is above the blocks
|
||||||
# which handle static assets (as seen below). If this block is not declared first,
|
# which handle static assets (as seen below). If this block is not declared first,
|
||||||
|
@ -87,15 +92,18 @@ location ^~ __PATH__/ {
|
||||||
# Required for legacy support
|
# Required for legacy support
|
||||||
# https://github.com/nextcloud/documentation/pull/2197#issuecomment-721432337
|
# https://github.com/nextcloud/documentation/pull/2197#issuecomment-721432337
|
||||||
# This line fix the ldap admin page
|
# This line fix the ldap admin page
|
||||||
rewrite ^__PATH__/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy) __PATH__/index.php$request_uri;
|
rewrite ^__PATH__/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) __PATH__/index.php$request_uri;
|
||||||
|
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
set $path_info $fastcgi_path_info;
|
set $path_info $fastcgi_path_info;
|
||||||
try_files $fastcgi_script_name =404;
|
|
||||||
include fastcgi_params;
|
|
||||||
|
|
||||||
|
try_files $fastcgi_script_name =404;
|
||||||
|
|
||||||
|
include fastcgi_params;
|
||||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||||
fastcgi_param PATH_INFO $path_info;
|
fastcgi_param PATH_INFO $path_info;
|
||||||
fastcgi_param HTTPS on;
|
fastcgi_param HTTPS on;
|
||||||
|
|
||||||
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
|
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
|
||||||
fastcgi_param front_controller_active true; # Enable pretty urls
|
fastcgi_param front_controller_active true; # Enable pretty urls
|
||||||
fastcgi_param HTTP_ACCEPT_ENCODING ""; # Disable encoding of nextcloud response to inject ynh scripts
|
fastcgi_param HTTP_ACCEPT_ENCODING ""; # Disable encoding of nextcloud response to inject ynh scripts
|
||||||
|
@ -104,10 +112,19 @@ location ^~ __PATH__/ {
|
||||||
fastcgi_request_buffering off;
|
fastcgi_request_buffering off;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ \.(?:css|js|svg|gif)$ {
|
location ~ ^__PATH__/(?:updater|ocs-provider)(?:$|/) {
|
||||||
|
try_files $uri/ =404;
|
||||||
|
index index.php;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.(?:css|js|svg|gif|png|jpg|ico|wasm|tflite|map)$ {
|
||||||
try_files $uri / __PATH__/index.php$request_uri;
|
try_files $uri / __PATH__/index.php$request_uri;
|
||||||
expires 6M; # Cache-Control policy borrowed from `.htaccess`
|
expires 6M; # Cache-Control policy borrowed from `.htaccess`
|
||||||
access_log off; # Optional: Don't log access to assets
|
access_log off; # Optional: Don't log access to assets
|
||||||
|
|
||||||
|
location ~ \.wasm$ {
|
||||||
|
default_type application/wasm;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ \.woff2?$ {
|
location ~ \.woff2?$ {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Nextcloud Hub is a fully open-source on-premises content collaboration platform. Teams access, share and edit their documents, chat and participate in video calls and manage their mail and calendar and projects across mobile, desktop and web interfaces.
|
Nextcloud Hub is a fully open-source on-premises content collaboration platform. Teams access, share and edit their documents, chat and participate in video calls and manage their mail and calendar and projects across mobile, desktop and web interfaces.
|
||||||
|
|
||||||
### YunoHost features:
|
### YunoHost-specific features
|
||||||
|
|
||||||
In addition to Nextcloud core features, the following are made available with
|
In addition to Nextcloud core features, the following are made available with
|
||||||
this package:
|
this package:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Nextcloud Hub est la plate-forme de collaboration de contenu sur site entièrement open source. Les équipes accèdent, partagent et modifient leurs documents, discutent et participent à des appels vidéo et gèrent leur courrier, leur calendrier et leurs projets sur des interfaces mobiles, de bureau et Web.
|
Nextcloud Hub est la plate-forme de collaboration de contenu sur site entièrement open source. Les équipes accèdent, partagent et modifient leurs documents, discutent et participent à des appels vidéo et gèrent leur courrier, leur calendrier et leurs projets sur des interfaces mobiles, de bureau et Web.
|
||||||
|
|
||||||
### Caractéristiques spécifiques YunoHost :
|
### Caractéristiques spécifiques YunoHost
|
||||||
|
|
||||||
En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suivantes sont incluses dans ce package :
|
En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suivantes sont incluses dans ce package :
|
||||||
|
|
||||||
|
@ -8,4 +8,4 @@ En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suiv
|
||||||
* Permet à un utilisateur d'être l'administrateur (choisi à l'installation)
|
* Permet à un utilisateur d'être l'administrateur (choisi à l'installation)
|
||||||
* Permet de multiples instances de cette application
|
* Permet de multiples instances de cette application
|
||||||
* Accès optionnel au répertoire home depuis les fichiers Nextcloud (à activer à l'installation, le partage étant activé par défaut)
|
* Accès optionnel au répertoire home depuis les fichiers Nextcloud (à activer à l'installation, le partage étant activé par défaut)
|
||||||
* Utilise l'adresse `/.well-known` pour la synchronisation CalDAV et CardDAV du domaine si aucun autre service ne l'utilise déjà - par exemple, baikal
|
* Utilise l'adresse `/.well-known` pour la synchronisation CalDAV et CardDAV du domaine si aucun autre service ne l'utilise déjà - par exemple, Baïkal
|
||||||
|
|
|
@ -14,15 +14,3 @@ To install and configure it:
|
||||||
#### With YunoHost App (ARM64 support, better performance)
|
#### With YunoHost App (ARM64 support, better performance)
|
||||||
|
|
||||||
For better performance and ARM64 support, install ONLYOFFICE YunoHost App and connect it to Nextcloud, see the tutorial in the [doc of onlyoffice_ynh package](https://github.com/YunoHost-Apps/onlyoffice_ynh/blob/master/README_fr.md#configuration-de-onlyoffice-server)
|
For better performance and ARM64 support, install ONLYOFFICE YunoHost App and connect it to Nextcloud, see the tutorial in the [doc of onlyoffice_ynh package](https://github.com/YunoHost-Apps/onlyoffice_ynh/blob/master/README_fr.md#configuration-de-onlyoffice-server)
|
||||||
|
|
||||||
|
|
||||||
## YunoHost specific features
|
|
||||||
|
|
||||||
In addition to Nextcloud core features, the following are made available with
|
|
||||||
this package:
|
|
||||||
|
|
||||||
* Integrate with YunoHost users and SSO - i.e. logout button
|
|
||||||
* Allow one user to be the administrator (set at the installation)
|
|
||||||
* Allow multiple instances of this application
|
|
||||||
* Optionally access the user home folder from Nextcloud files (set at the installation, the sharing is enabled by default)
|
|
||||||
* Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Online storage, file sharing platform and various other applications",
|
"en": "Online storage, file sharing platform and various other applications",
|
||||||
"fr": "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications"
|
"fr": "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications"
|
||||||
},
|
},
|
||||||
"version": "25.0.3~ynh4",
|
"version": "27.1.2~ynh2",
|
||||||
"url": "https://nextcloud.com",
|
"url": "https://nextcloud.com",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
"email": "pierre@kayou.io"
|
"email": "pierre@kayou.io"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 11.0.9"
|
"yunohost": ">= 11.2"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
@ -51,8 +51,8 @@
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"help": {
|
"help": {
|
||||||
"en": "If enabled, Nextcloud will be accessible by Nextcloud Desktop and by users without a YunoHost account. This can be changed later in the webadmin.",
|
"en": "You need to enable public if you want to connect Nextcloud Desktop client to Nextcloud server. This can be changed later via the webadmin.",
|
||||||
"fr": "Si cette case est cochée, Nextcloud sera accessible par Nextcloud Desktop et par les utilisateurs n’ayant pas de compte YunoHost. Vous pourrez changer dans la webadmin."
|
"fr": "Vous devez cocher cette case si vous souhaitez connecter le client Nextcloud Desktop au serveur Nextcloud. Cela peut être modifié ultérieurement via l'administrateur Web."
|
||||||
},
|
},
|
||||||
"default": true
|
"default": true
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
YNH_PHP_VERSION="8.1"
|
YNH_PHP_VERSION="8.2"
|
||||||
|
|
||||||
php_dependencies="php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-bz2 php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-apcu php${YNH_PHP_VERSION}-redis php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-igbinary php${YNH_PHP_VERSION}-bcmath"
|
php_dependencies="php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-bz2 php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-apcu php${YNH_PHP_VERSION}-redis php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-igbinary php${YNH_PHP_VERSION}-bcmath"
|
||||||
|
|
||||||
|
|
36
scripts/_ynh_mysql_connect_as.sh
Normal file
36
scripts/_ynh_mysql_connect_as.sh
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Open a connection as a user
|
||||||
|
#
|
||||||
|
# example: ynh_mysql_connect_as --user="user" --password="pass" <<< "UPDATE ...;"
|
||||||
|
# example: ynh_mysql_connect_as --user="user" --password="pass" --default_character_set="utf8mb4" < /path/to/file.sql
|
||||||
|
#
|
||||||
|
# usage: ynh_mysql_connect_as --user=user --password=password [--database=database] [--default_character_set=character-set]
|
||||||
|
# | arg: -u, --user= - the user name to connect as
|
||||||
|
# | arg: -p, --password= - the user password
|
||||||
|
# | arg: -d, --database= - the database to connect to
|
||||||
|
# | arg: -c, --default_character_set= - the charset to use
|
||||||
|
#
|
||||||
|
# Requires YunoHost version 2.2.4 or higher.
|
||||||
|
ynh_mysql_connect_as() {
|
||||||
|
# Declare an array to define the options of this helper.
|
||||||
|
local legacy_args=updc
|
||||||
|
local -A args_array=( [u]=user= [p]=password= [d]=database= [c]=default_character_set= )
|
||||||
|
local user
|
||||||
|
local password
|
||||||
|
local database
|
||||||
|
local default_character_set
|
||||||
|
# Manage arguments with getopts
|
||||||
|
ynh_handle_getopts_args "$@"
|
||||||
|
database="${database:-}"
|
||||||
|
default_character_set="${default_character_set:-}"
|
||||||
|
|
||||||
|
if [ -n "$default_character_set" ]
|
||||||
|
then
|
||||||
|
default_character_set="--default-character-set=$default_character_set"
|
||||||
|
else
|
||||||
|
default_character_set="--default-character-set=latin1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mysql --user="$user" --password="$password" "$default_character_set" --batch "$database"
|
||||||
|
}
|
37
scripts/_ynh_mysql_dump_db.sh
Normal file
37
scripts/_ynh_mysql_dump_db.sh
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Dump a database
|
||||||
|
#
|
||||||
|
# example: ynh_mysql_dump_db --database=roundcube --default_character_set="utf8mb4" > ./dump.sql
|
||||||
|
#
|
||||||
|
# usage: ynh_mysql_dump_db --database=database
|
||||||
|
# | arg: -d, --database= - the database name to dump
|
||||||
|
# | arg: -c, --default_character_set= - the charset to use
|
||||||
|
# | ret: the mysqldump output
|
||||||
|
#
|
||||||
|
# Requires YunoHost version 2.2.4 or higher.
|
||||||
|
ynh_mysql_dump_db() {
|
||||||
|
# Declare an array to define the options of this helper.
|
||||||
|
local legacy_args=dc
|
||||||
|
local -A args_array=( [d]=database= [c]=default_character_set= )
|
||||||
|
local database
|
||||||
|
local default_character_set
|
||||||
|
# Manage arguments with getopts
|
||||||
|
ynh_handle_getopts_args "$@"
|
||||||
|
default_character_set="${default_character_set:-}"
|
||||||
|
MYSQL_ROOT_PWD_FILE=/etc/yunohost/mysql
|
||||||
|
|
||||||
|
if [ -n "$default_character_set" ]
|
||||||
|
then
|
||||||
|
default_character_set="--default-character-set=$default_character_set"
|
||||||
|
else
|
||||||
|
# By default, default character set is "latin1"
|
||||||
|
default_character_set="--default-character-set=latin1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$MYSQL_ROOT_PWD_FILE" ]; then
|
||||||
|
mysqldump --user="root" --password="$(cat $MYSQL_ROOT_PWD_FILE)" --single-transaction --skip-dump-date "$default_character_set" "$database"
|
||||||
|
else
|
||||||
|
mysqldump --single-transaction --skip-dump-date "$default_character_set" "$database"
|
||||||
|
fi
|
||||||
|
}
|
|
@ -1,66 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC STARTING
|
|
||||||
#=================================================
|
|
||||||
# IMPORT GENERIC HELPERS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
source scripts/_common.sh
|
|
||||||
source /usr/share/yunohost/helpers
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RETRIEVE ARGUMENTS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
|
||||||
|
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK IF ARGUMENTS ARE CORRECT
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# DEFINE FUNCTION
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Define a function to execute commands with `occ`
|
|
||||||
exec_occ() {
|
|
||||||
(cd "$final_path" && exec_as "$app" \
|
|
||||||
php$YNH_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@")
|
|
||||||
}
|
|
||||||
|
|
||||||
# Define a function to add an external storage
|
|
||||||
# Create the external storage for the given folders and enable sharing
|
|
||||||
create_external_storage() {
|
|
||||||
local datadir="$1"
|
|
||||||
local mount_name="$2"
|
|
||||||
local mount_id=`exec_occ files_external:create --output=json \
|
|
||||||
"$mount_name" 'local' 'null::null' -c "datadir=$datadir" || true`
|
|
||||||
! [[ $mount_id =~ ^[0-9]+$ ]] \
|
|
||||||
&& ynh_print_warn --message="Unable to create external storage" \
|
|
||||||
|| exec_occ files_external:option "$mount_id" enable_sharing true
|
|
||||||
}
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC ACTION
|
|
||||||
#=================================================
|
|
||||||
# YUNOHOST MULTIMEDIA INTEGRATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Updating multimedia directories..." --weight=6
|
|
||||||
|
|
||||||
# Build YunoHost multimedia directories
|
|
||||||
ynh_multimedia_build_main_dir
|
|
||||||
# Mount the user directory in Nextcloud
|
|
||||||
exec_occ app:enable files_external
|
|
||||||
create_external_storage "/home/yunohost.multimedia/\$user" "Multimedia"
|
|
||||||
create_external_storage "/home/yunohost.multimedia/share" "Shared multimedia"
|
|
||||||
# Allow nextcloud to write into these directories
|
|
||||||
ynh_multimedia_addaccess $app
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# END OF SCRIPT
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_script_progression --message="Execution completed" --last
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC STARTING
|
|
||||||
#=================================================
|
|
||||||
# IMPORT GENERIC HELPERS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
source scripts/_common.sh
|
|
||||||
source /usr/share/yunohost/helpers
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RETRIEVE ARGUMENTS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
|
||||||
|
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK IF ARGUMENTS ARE CORRECT
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK IF AN ACTION HAS TO BE DONE
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Check the current status of the maintenance mode
|
|
||||||
|
|
||||||
if [ "$(grep "maintenance" "$final_path/config/config.php" | awk '{print $3}' | cut -d',' -f1)" != "true" ]
|
|
||||||
then
|
|
||||||
ynh_die --message="Nextcloud isn't currently under maintenance." --ret_code=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC ACTION
|
|
||||||
#=================================================
|
|
||||||
# DISABLE THE MAINTENANCE MODE
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_script_progression --message="Disabling maintenance mode..." --weight=3
|
|
||||||
|
|
||||||
(
|
|
||||||
cd "$final_path" && exec_as "$app" \
|
|
||||||
php$YNH_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi maintenance:mode --off
|
|
||||||
)
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# END OF SCRIPT
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_script_progression --message="Execution completed" --last
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
source ../settings/scripts/_common.sh
|
source ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
source ../settings/scripts/_ynh_mysql_dump_db.sh
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MANAGE SCRIPT FAILURE
|
# MANAGE SCRIPT FAILURE
|
||||||
|
@ -57,7 +58,7 @@ ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info --message="Backing up the MySQL database..."
|
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" --default_character_set="utf8mb4" > db.sql
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC BACKUP
|
# SPECIFIC BACKUP
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
source _ynh_mysql_connect_as.sh
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MANAGE SCRIPT FAILURE
|
# MANAGE SCRIPT FAILURE
|
||||||
|
@ -78,6 +79,9 @@ db_user=$db_name
|
||||||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||||
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
|
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
|
||||||
|
|
||||||
|
ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name \
|
||||||
|
<<< "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -190,6 +194,9 @@ exec_occ maintenance:install \
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring Nextcloud..." --weight=8
|
ynh_script_progression --message="Configuring Nextcloud..." --weight=8
|
||||||
|
|
||||||
|
# Set the mysql.utf8mb4 config to true in config.php
|
||||||
|
exec_occ config:system:set mysql.utf8mb4 --type boolean --value="true"
|
||||||
|
|
||||||
# Ensure that UpdateNotification app is disabled
|
# Ensure that UpdateNotification app is disabled
|
||||||
exec_occ app:disable updatenotification
|
exec_occ app:disable updatenotification
|
||||||
|
|
||||||
|
@ -275,7 +282,7 @@ exec_occ config:system:set overwrite.cli.url --value="https://${domain}"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Set the user as admin
|
# Set the user as admin
|
||||||
ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name \
|
ynh_mysql_connect_as --user=$db_name --password="$db_pwd" --database=$db_name --default_character_set="utf8mb4" \
|
||||||
<<< "INSERT INTO oc_group_user VALUES ('admin','$admin');"
|
<<< "INSERT INTO oc_group_user VALUES ('admin','$admin');"
|
||||||
# And delete admin user
|
# And delete admin user
|
||||||
exec_occ user:delete admin
|
exec_occ user:delete admin
|
||||||
|
@ -329,10 +336,10 @@ ynh_multimedia_addaccess $app
|
||||||
# Fix app ownerships & permissions
|
# Fix app ownerships & permissions
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
chown -R $app: "$datadir"
|
chown -R $app: "$datadir"
|
||||||
find $final_path/ -type f -print0 | xargs -0 chmod 0644
|
find $final_path/ -type f -print0 | xargs -r0 chmod 0644
|
||||||
find $final_path/ -type d -print0 | xargs -0 chmod 0755
|
find $final_path/ -type d -print0 | xargs -r0 chmod 0755
|
||||||
find $datadir/ -type f -print0 | xargs -0 chmod 0640
|
find $datadir/ -type f -print0 | xargs -r0 chmod 0640
|
||||||
find $datadir/ -type d -print0 | xargs -0 chmod 0750
|
find $datadir/ -type d -print0 | xargs -r0 chmod 0750
|
||||||
chmod 640 "$final_path/config/config.php"
|
chmod 640 "$final_path/config/config.php"
|
||||||
chmod 755 /home/yunohost.app
|
chmod 755 /home/yunohost.app
|
||||||
chmod 750 $final_path
|
chmod 750 $final_path
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
source ../settings/scripts/_common.sh
|
source ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
source ../settings/scripts/_ynh_mysql_connect_as.sh
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MANAGE SCRIPT FAILURE
|
# MANAGE SCRIPT FAILURE
|
||||||
|
@ -57,8 +58,11 @@ ynh_restore_file --origin_path="$final_path"
|
||||||
ynh_script_progression --message="Restoring the MySQL database..." --weight=9
|
ynh_script_progression --message="Restoring the MySQL database..." --weight=9
|
||||||
|
|
||||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||||
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$db_pwd
|
||||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
ynh_mysql_connect_as --user=$db_name --password="$db_pwd" --database=$db_name \
|
||||||
|
<<< "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"
|
||||||
|
|
||||||
|
ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name --default_character_set="utf8mb4" < ./db.sql
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RECREATE THE DEDICATED USER
|
# RECREATE THE DEDICATED USER
|
||||||
|
@ -135,10 +139,10 @@ mkdir -p "$datadir"
|
||||||
# Fix app ownerships & permissions
|
# Fix app ownerships & permissions
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
chown -R $app: "$datadir"
|
chown -R $app: "$datadir"
|
||||||
find $final_path/ -type f -print0 | xargs -0 chmod 0644
|
find $final_path/ -type f -print0 | xargs -r0 chmod 0644
|
||||||
find $final_path/ -type d -print0 | xargs -0 chmod 0755
|
find $final_path/ -type d -print0 | xargs -r0 chmod 0755
|
||||||
find $datadir/ -type f -print0 | xargs -0 chmod 0640
|
find $datadir/ -type f -print0 | xargs -r0 chmod 0640
|
||||||
find $datadir/ -type d -print0 | xargs -0 chmod 0750
|
find $datadir/ -type d -print0 | xargs -r0 chmod 0750
|
||||||
chmod 640 "$final_path/config/config.php"
|
chmod 640 "$final_path/config/config.php"
|
||||||
chmod 755 /home/yunohost.app
|
chmod 755 /home/yunohost.app
|
||||||
chmod 750 $final_path
|
chmod 750 $final_path
|
||||||
|
|
|
@ -251,6 +251,15 @@ then
|
||||||
# Print the current version number of Nextcloud
|
# Print the current version number of Nextcloud
|
||||||
exec_occ -V
|
exec_occ -V
|
||||||
|
|
||||||
|
if [ "$(exec_occ config:system:get mysql.utf8mb4)" != "true" ]; then
|
||||||
|
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||||
|
# Change your databases character set and collation
|
||||||
|
ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name \
|
||||||
|
<<< "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"
|
||||||
|
# Set the mysql.utf8mb4 config to true in config.php
|
||||||
|
exec_occ config:system:set mysql.utf8mb4 --type boolean --value="true"
|
||||||
|
exec_occ maintenance:repair
|
||||||
|
fi
|
||||||
|
|
||||||
# Upgrade may fail if this app is enabled
|
# Upgrade may fail if this app is enabled
|
||||||
# Take all apps enabled, and check if mail is one of them
|
# Take all apps enabled, and check if mail is one of them
|
||||||
|
@ -443,10 +452,10 @@ exec_occ background:cron
|
||||||
# Fix app ownerships & permissions
|
# Fix app ownerships & permissions
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
chown -R $app: "$datadir"
|
chown -R $app: "$datadir"
|
||||||
find $final_path/ -type f -print0 | xargs -0 chmod 0644
|
find $final_path/ -type f -print0 | xargs -r0 chmod 0644
|
||||||
find $final_path/ -type d -print0 | xargs -0 chmod 0755
|
find $final_path/ -type d -print0 | xargs -r0 chmod 0755
|
||||||
find $datadir/ -type f -print0 | xargs -0 chmod 0640
|
find $datadir/ -type f -print0 | xargs -r0 chmod 0640
|
||||||
find $datadir/ -type d -print0 | xargs -0 chmod 0750
|
find $datadir/ -type d -print0 | xargs -r0 chmod 0750
|
||||||
chmod 640 "$final_path/config/config.php"
|
chmod 640 "$final_path/config/config.php"
|
||||||
chmod 755 /home/yunohost.app
|
chmod 755 /home/yunohost.app
|
||||||
chmod 750 $final_path
|
chmod 750 $final_path
|
||||||
|
|
7
scripts/upgrade.d/upgrade.25.sh
Normal file
7
scripts/upgrade.d/upgrade.25.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Last available Nextcloud version
|
||||||
|
next_version="26.0.0"
|
||||||
|
|
||||||
|
# Nextcloud tarball checksum sha256
|
||||||
|
nextcloud_source_sha256="f163150363aee9366ecb5cd5259bf6756ed4f073cea78b5fa515cada7a0d0c3d"
|
7
scripts/upgrade.d/upgrade.26.sh
Normal file
7
scripts/upgrade.d/upgrade.26.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Last available Nextcloud version
|
||||||
|
next_version="27.0.0"
|
||||||
|
|
||||||
|
# Nextcloud tarball checksum sha256
|
||||||
|
nextcloud_source_sha256="3d312a09b9345ac058758dd7b4059bf3cf0b1f0f1d747251b6fac3585ba6533f"
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Last available Nextcloud version
|
# Last available Nextcloud version
|
||||||
next_version="25.0.3"
|
next_version="27.1.2"
|
||||||
|
|
||||||
# Nextcloud tarball checksum sha256
|
# Nextcloud tarball checksum sha256
|
||||||
nextcloud_source_sha256="4b2b1423736ef92469096fe24f61c24cad87a34e07c1c7a81b385d3ea25c00ec"
|
nextcloud_source_sha256="0742b247aaee0b7044db0062f0a914aa77338c7a7d8fe7da0917147d76689721"
|
||||||
|
|
Loading…
Add table
Reference in a new issue