Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
207 commits
Select commit Hold shift + click to select a range
225f1bb
move function to common.sh (#764)
ericgaspar Dec 19, 2024
773ada7
add default_phone_region
ericgaspar Dec 19, 2024
3fb2bb6
Update nginx.conf
ericgaspar Dec 19, 2024
25341f9
Update install
ericgaspar Dec 19, 2024
85c3187
Fix upgrade exploding when $app is nextcloud__2, __3 etc because the …
rodinux Dec 20, 2024
5e4f393
Bump package revision
yunohost-bot Dec 20, 2024
a8378a5
Auto-update READMEs
yunohost-bot Dec 20, 2024
be58bb1
Patch (#768)
ericgaspar Dec 21, 2024
ff3899f
Merge branch 'master' into testing
ericgaspar Dec 24, 2024
e938aeb
Fix fail2ban failregex
looowizz Dec 26, 2024
1a1d9d1
30.0.5
ericgaspar Jan 17, 2025
863381c
Auto-update READMEs
yunohost-bot Jan 17, 2025
ced3d91
Update restore
ericgaspar Jan 19, 2025
dc0fb3d
Update upgrade (#777)
ericgaspar Jan 19, 2025
c6489b6
Update upgrade
ericgaspar Jan 19, 2025
57b41db
Update manifest.toml
ericgaspar Jan 19, 2025
8947bb8
Update manifest.toml
ericgaspar Jan 21, 2025
4c23d65
Update post_user_delete (#778)
ericgaspar Jan 26, 2025
6f01759
Merge branch 'master' into testing
ericgaspar Jan 30, 2025
7f1b13d
Update upgrade (#779)
ericgaspar Jan 30, 2025
8fa00f9
[fix] Remove eval JS patch cause yunohost tiles doesn't exists anymore
zamentur Feb 5, 2025
b9d53ed
Update manifest.toml
ericgaspar Feb 9, 2025
11eb850
Auto-update READMEs
yunohost-bot Feb 9, 2025
577da1f
cleaning
ericgaspar Feb 9, 2025
529c368
cleaning
ericgaspar Feb 9, 2025
a4c2c06
Update remove
ericgaspar Feb 9, 2025
83bb5a6
[enh] Allow login by mail (#783)
zamentur Feb 11, 2025
0d856a8
30.0.6
ericgaspar Feb 13, 2025
5e7de8c
Auto-update READMEs
yunohost-bot Feb 13, 2025
c9e4442
Merge branch 'master' into testing
ericgaspar Feb 13, 2025
a902183
Update manifest.toml
ericgaspar Feb 15, 2025
ffaebda
Merge branch 'testing' into master
kay0u Feb 15, 2025
ff44cfd
Merge pull request #770 from looowizz/master
kay0u Feb 15, 2025
631ac0c
Update manifest.toml
ericgaspar Feb 16, 2025
5d71127
Auto-update READMEs
yunohost-bot Feb 16, 2025
11e30da
[enh] Create custom fail2ban conf, with datepattern and more regex to…
kay0u Feb 18, 2025
04e8948
Merge branch 'master' into testing
ericgaspar Feb 22, 2025
9049d47
Update systemd.service
ericgaspar Feb 22, 2025
913ea56
Update DESCRIPTION_fr.md
ericgaspar Feb 22, 2025
7d70d56
Auto-update READMEs
yunohost-bot Feb 22, 2025
00e64f6
Update manifest.toml (#788)
ericgaspar Feb 27, 2025
6d3e6a1
Update manifest.toml
ericgaspar Feb 27, 2025
8c11acf
Auto-update READMEs
yunohost-bot Feb 27, 2025
1b748ea
Update config: syntax for enable_forward_email was using the old 2.0 …
alexAubin Feb 27, 2025
18d65f2
Merge branch 'master' into testing
ericgaspar Feb 27, 2025
79c3223
Update config
rodinux Feb 27, 2025
b8d178a
Update config
rodinux Feb 27, 2025
ee5d1d1
Update config
rodinux Feb 27, 2025
61840c4
Removing argument --file to calls of ynh_store_file_checksum helper (…
e-jim Mar 13, 2025
a0a4e22
30.0.7
ericgaspar Mar 13, 2025
b327d69
Auto-update READMEs
yunohost-bot Mar 13, 2025
1556216
Update remove
ericgaspar Mar 13, 2025
b2075a8
30.0.8
ericgaspar Mar 19, 2025
f64623a
Auto-update READMEs
yunohost-bot Mar 19, 2025
e20543f
Merge branch 'master' into testing
ericgaspar Mar 21, 2025
39028e5
31.0.2 (#787)
ericgaspar Mar 22, 2025
73c5a62
31.0.3 (#795)
ericgaspar Apr 11, 2025
5097e26
Merge branch 'master' into testing
ericgaspar Apr 15, 2025
2350f9a
Update manifest.toml
ericgaspar Apr 17, 2025
a3d27de
Update manifest.toml
ericgaspar Apr 17, 2025
1c9f476
Merge branch 'master' into testing
ericgaspar Apr 17, 2025
a2aa016
Merge branch 'master' into testing
ericgaspar Apr 18, 2025
46f6c07
add versions_ and trashbin_retention_obligation (#805)
Gredin67 May 5, 2025
231034b
Auto-update READMEs
yunohost-bot May 5, 2025
925c47a
Update manifest.toml
ericgaspar May 15, 2025
3f48ba2
Auto-update READMEs
yunohost-bot May 15, 2025
7d73c27
Update manifest.toml
ericgaspar May 15, 2025
6f77fc4
Merge branch 'testing' of https://github.com/YunoHost-Apps/nextcloud_…
ericgaspar May 15, 2025
d770a97
Improve documentation for user_home question (#808)
tituspijean May 28, 2025
eabfd3b
Merge branch 'master' into testing
ericgaspar May 28, 2025
0b7fa65
Merge pull request #810 from YunoHost-Apps/master
alexAubin Jun 5, 2025
7bf1685
Update manifest.toml
ericgaspar Jun 12, 2025
45967cb
Auto-update READMEs
yunohost-bot Jun 12, 2025
3f5ea5a
Update manifest.toml
ericgaspar Jun 12, 2025
7158637
Merge branch 'testing' of https://github.com/YunoHost-Apps/nextcloud_…
ericgaspar Jun 12, 2025
7615afe
change x to X, add --recursive, add a default acl for new elements (#…
kay0u Jun 17, 2025
6d02113
Merge branch 'master' into testing
zamentur Jun 17, 2025
e9cf2ec
Fix inconsistent php version during upgrade with occ (#815)
alexAubin Jun 17, 2025
31bd516
Manage oldstable version (#816)
zamentur Jun 17, 2025
8b03102
[fix] Logout url missing
zamentur Jun 17, 2025
2a799bc
V2 postgresql (#597)
ericgaspar Jun 17, 2025
8974b24
[fix] Upgrade with oldstable
zamentur Jun 17, 2025
9e79535
[enh] Use php8.3-fpm for olstable - 30 version
zamentur Jun 17, 2025
4014098
[fix] Upgrade with oldstable
zamentur Jun 17, 2025
46b1a77
[enh] Use php8.3-fpm for olstable - 30 version
zamentur Jun 17, 2025
8904b9a
[fix] Remove oldstable features
zamentur Jun 18, 2025
0a48ead
[fix] Remove oldstable from tests
zamentur Jun 18, 2025
117f663
[fix] Dead code
zamentur Jun 18, 2025
8c7973f
[fix] Dead code
zamentur Jun 18, 2025
5c807f9
[fix] Remove oldstable features
zamentur Jun 18, 2025
a183c2d
[fix] Remove oldstable from tests
zamentur Jun 18, 2025
8736299
[fix] Dead code
zamentur Jun 18, 2025
3908d61
[fix] Dead code
zamentur Jun 18, 2025
fe7f562
[wip] DB migration
zamentur Jun 17, 2025
2528d02
[fix] Upgrade remove executable perm for nc extension
zamentur Jun 19, 2025
b2d77db
[fix] Upgrade remove executable perm for nc extension
zamentur Jun 19, 2025
4eee86b
[fix] Config upgrade + small fix double wc -l
zamentur Jun 20, 2025
05dff7b
[fix] Backup config file before to replace it
zamentur Jun 20, 2025
85777a0
[fix] Remove warnings and check for free space
zamentur Jun 20, 2025
db259bc
[fix] free_space in MB instead of Bytes
zamentur Jun 20, 2025
4082af6
[fix] Unneeded warning
zamentur Jun 20, 2025
c50cd31
Merge branch 'testing' into postgresql_reboot
ericgaspar Jun 24, 2025
7275030
Update manifest.toml
ericgaspar Jul 2, 2025
638fd47
Auto-update READMEs
yunohost-bot Jul 2, 2025
19c4426
Merge branch 'testing' into postgresql_reboot
ericgaspar Jul 7, 2025
d40600b
Update manifest.toml
ericgaspar Jul 10, 2025
824822e
Merge branch 'master' into testing
ericgaspar Jul 10, 2025
76959dc
Merge branch 'testing' into postgresql_reboot
ericgaspar Jul 10, 2025
1a08783
Update tests.toml
ericgaspar Jul 10, 2025
f56c10a
Update ADMIN.md: update advice to open shell + add a note on how to p…
alexAubin Jul 18, 2025
bb69cea
Auto-update READMEs
yunohost-bot Jul 18, 2025
fe097b0
Update ADMIN.md: markdown tweak
alexAubin Jul 18, 2025
91b8a83
Update ADMIN_fr.md: propagate changes to fr doc
alexAubin Jul 18, 2025
0de64f1
fix settings enable_mail_forward in install and upgrade scripts
rodinux Jul 21, 2025
698abea
try fix ldap_email-attribute
rodinux Jul 22, 2025
6909349
unused value settings
rodinux Jul 22, 2025
9c2b92f
Auto-update READMEs
yunohost-bot Jul 22, 2025
14fe90b
Merge pull request #822 from YunoHost-Apps/adjust_mail_forward
rodinux Jul 23, 2025
d099040
Merge branch 'master' into testing
ericgaspar Jul 23, 2025
b02998c
Merge branch 'testing' into postgresql_reboot
ericgaspar Jul 23, 2025
d334d28
Update upgrade
ericgaspar Jul 24, 2025
ca18804
Update upgrade
ericgaspar Jul 24, 2025
ad70681
Merge remote-tracking branch 'origin/testing' into postgresql_reboot
ericgaspar Jul 30, 2025
12505ef
Auto-update READMEs
yunohost-bot Jul 30, 2025
9900bce
Merge branch 'testing' into postgresql_reboot
ericgaspar Aug 14, 2025
3528f97
Auto-update READMEs
yunohost-bot Aug 14, 2025
df688de
Merge branch 'testing' into postgresql_reboot
ericgaspar Sep 6, 2025
59af3f4
Merge branch 'testing' into postgresql_reboot
ericgaspar Sep 6, 2025
c17d6ba
Merge branch 'testing' into postgresql_reboot
ericgaspar Sep 7, 2025
4823bab
Merge branch 'testing' into postgresql_reboot
ericgaspar Sep 11, 2025
2e6215b
Merge branch 'testing' into postgresql_reboot
ericgaspar Sep 15, 2025
cac3447
Update manifest.toml
ericgaspar Sep 27, 2025
ef3fac0
Auto-update READMEs
yunohost-bot Sep 27, 2025
4d9ab89
Update manifest.toml
ericgaspar Sep 28, 2025
f47e93c
Update install
ericgaspar Sep 28, 2025
24ffa41
Update manifest.toml
ericgaspar Oct 23, 2025
e1f22d8
Auto-update READMEs
yunohost-bot Oct 23, 2025
4c56dab
Update config.json
ericgaspar Nov 19, 2025
515f077
Update manifest.toml
ericgaspar Nov 20, 2025
3914fff
Auto-update READMEs
yunohost-bot Nov 20, 2025
0fe02a0
Update manifest.toml
ericgaspar Nov 20, 2025
1c67406
Merge branch 'postgresql_reboot' of https://github.com/YunoHost-Apps/…
ericgaspar Nov 20, 2025
1857da8
Merge branch 'testing' into postgresql_reboot
ericgaspar Nov 20, 2025
874df10
Update manifest.toml
ericgaspar Nov 30, 2025
404e262
Update install
ericgaspar Dec 9, 2025
b55601c
Update manifest.toml
ericgaspar Dec 11, 2025
bbfb22c
Auto-update READMEs
yunohost-bot Dec 11, 2025
d5267dd
Merge branch 'testing' into postgresql_reboot
ericgaspar Dec 28, 2025
f5f455b
[autopatch] Automatic patch to simplify `proxy_pass`/`fastcgi_pass` o…
Dec 31, 2025
cf242fe
Merge branch 'testing' into postgresql_reboot
ericgaspar Jan 1, 2026
2641527
Update tests.toml
ericgaspar Jan 2, 2026
df5b470
Merge branch 'pr/845' into postgresql_reboot
ericgaspar Jan 2, 2026
c325543
Merge branch 'testing' into postgresql_reboot
ericgaspar Jan 15, 2026
89728b2
Auto-update READMEs
yunohost-bot Jan 15, 2026
c1aae5d
Update manifest.toml
ericgaspar Jan 16, 2026
8ac4786
Auto-update READMEs
yunohost-bot Jan 16, 2026
996ec11
Update nginx.conf
ericgaspar Jan 16, 2026
414134f
Merge branch 'postgresql_reboot' of https://github.com/YunoHost-Apps/…
ericgaspar Jan 16, 2026
8349b5f
Update manifest.toml
ericgaspar Jan 16, 2026
290963b
Update nginx.conf
ericgaspar Jan 16, 2026
a641506
add port
ericgaspar Jan 27, 2026
aaaeea0
Update systemd.service
ericgaspar Jan 27, 2026
b192dfd
Update systemd.service
ericgaspar Jan 27, 2026
e83496e
Update upgrade
ericgaspar Jan 27, 2026
9b4e028
Merge branch 'push' into postgresql_reboot
ericgaspar Jan 27, 2026
e711f0c
Merge branch 'testing' into postgresql_reboot
ericgaspar Feb 12, 2026
0e8d162
Update tests.toml
ericgaspar Feb 13, 2026
c32ec1e
Update manifest.toml
ericgaspar Feb 13, 2026
5c79dea
Update upgrade
ericgaspar Feb 16, 2026
71785dd
Update manifest.toml
ericgaspar Feb 18, 2026
f445a64
Auto-update READMEs
yunohost-bot Feb 18, 2026
966beac
Update manifest.toml
ericgaspar Feb 18, 2026
fbf8712
Merge branch 'postgresql_reboot' of https://github.com/YunoHost-Apps/…
ericgaspar Feb 18, 2026
5b95b4d
Update manifest.toml
ericgaspar Feb 18, 2026
5781d87
Auto-update READMEs
yunohost-bot Feb 18, 2026
3a2a16f
Update 00-add-logout_url-conf.patch
ericgaspar Feb 18, 2026
372aae9
Update 00-add-logout_url-conf.patch
ericgaspar Feb 18, 2026
56467a3
Update 00-add-logout_url-conf.patch
ericgaspar Feb 18, 2026
1836755
Update manifest.toml
ericgaspar Feb 18, 2026
1c42e59
Update manifest.toml
ericgaspar Feb 18, 2026
fa45740
cleaning
ericgaspar Feb 22, 2026
10a608d
Update ADMIN_fr.md
ericgaspar Feb 22, 2026
3ccbb47
cleaning
ericgaspar Feb 22, 2026
891f0df
Update nginx.conf (#850)
ericgaspar Feb 24, 2026
5190a81
Notify push (#856)
ericgaspar Feb 24, 2026
5b8a012
Update tests.toml
ericgaspar Feb 24, 2026
914fbcb
Update manifest.toml
ericgaspar Feb 24, 2026
68a4e29
Update upgrade
ericgaspar Feb 24, 2026
bf26651
Update upgrade
ericgaspar Feb 24, 2026
4a268e9
Update tests.toml
ericgaspar Feb 24, 2026
43f0241
Update tests.toml
ericgaspar Feb 24, 2026
e82a092
Update config
ericgaspar Feb 26, 2026
0026570
Merge branch '33.0.0' into postgresql_reboot
ericgaspar Feb 26, 2026
d462db1
Small improvements (#865)
ericgaspar Feb 26, 2026
01e1927
Update extra_php-fpm.conf
ericgaspar Feb 26, 2026
7032366
Update config.json
ericgaspar Feb 26, 2026
ac34ab3
revert
ericgaspar Feb 27, 2026
5be926c
Update install
ericgaspar Feb 27, 2026
ebec005
Merge branch 'testing' into postgresql_reboot
ericgaspar Feb 27, 2026
e54d6c6
Update change_url
ericgaspar Feb 28, 2026
c7232a8
Merge branch 'testing' into postgresql_reboot
ericgaspar Mar 2, 2026
0ced023
Update manifest.toml
ericgaspar Mar 26, 2026
9cf2430
Auto-update READMEs
yunohost-bot Mar 26, 2026
262f08a
Merge branch 'testing' into postgresql_reboot
ericgaspar Mar 27, 2026
9f918a4
Merge branch 'testing' into postgresql_reboot
ericgaspar Mar 29, 2026
cdd3e68
Merge branch 'testing' into postgresql_reboot
ericgaspar Apr 3, 2026
d38df07
Update manifest.toml
ericgaspar Apr 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conf/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"hashing_default_password": true,
"localstorage.allowsymlinks": true,
"simpleSignUpLink.shown": false,
"default_phone_region": "",
"default_phone_region": "fr",
"maintenance_window_start": 1,
"mail_smtpmode": "smtp",
"mail_smtpport": "25",
Expand Down
8 changes: 6 additions & 2 deletions doc/ADMIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ You can run Nextcloud commands from the command line by opening a Nextcloud "she

```bash
sudo yunohost app shell __APP__
# You should then see you're in a shell with "__APP__@yourmachine"
```
You should then see you're in a shell with "__APP__@yourmachine"
```
php occ ...
```
Alternatively, you can run `sudo -u __APP__ php__PHP_VERSION__ --define apc.enable_cli=1 __INSTALL_DIR__/occ ...`
Expand All @@ -17,6 +19,8 @@ This user can be added to the Nextcloud admin group with :

```bash
sudo yunohost app shell __APP__
# And then
```
And then
```
php occ group:adduser admin <username>
```
8 changes: 6 additions & 2 deletions doc/ADMIN_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Vous pouvez lancer des commandes Nextcloud en ouvrant un "shell" Nextcloud et ut

```bash
sudo yunohost app shell __APP__
# Vous devriez voir que vous êtes dans un shell "__APP__@yourmachine"
```
Vous devriez voir que vous êtes dans un shell `__APP__@yourmachine`
```
php occ ...
```

Expand All @@ -18,6 +20,8 @@ Vous pouvez ajouter le comptes aux admins de Nextcloud avec:

```bash
sudo yunohost app shell __APP__
# Puis
```
Puis
```
php occ group:adduser admin <username>
```
2 changes: 1 addition & 1 deletion doc/DESCRIPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ In the context of YunoHost, Nextcloud integrates with the SSO/User Portal (YunoH

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 YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud.
The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://apps.yunohost.org/app/onlyoffice) and [Collabora](https://apps.yunohost.org/app/collabora), which can be integrated with Nextcloud.
2 changes: 1 addition & 1 deletion doc/DESCRIPTION_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Dans le cadre de YunoHost, Nextcloud s'intègre avec le SSO/portail utilisateur

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à.

Le catalogue YunoHost dispose de deux suites bureautiques collaboratives, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) et [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), qui peuvent être intégrées à Nextcloud.
Le catalogue YunoHost dispose de deux suites bureautiques collaboratives, [OnlyOffice](https://apps.yunohost.org/app/onlyoffice) et [Collabora](https://apps.yunohost.org/app/collabora), qui peuvent être intégrées à Nextcloud.
1 change: 1 addition & 0 deletions doc/PRE_UPGRADE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Before updating NextCloud, make sure that your applications are compatible with the Nextcloud version you are about to install. Also update all your applications installed in NextCloud before updating.
1 change: 1 addition & 0 deletions doc/PRE_UPGRADE_fr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Avant de mettre à jour NextCloud, assurez-vous que vos applications sont compatibles avec la version de Nextcloud que vous êtes sur le point d'installer. Mettez également à jour l'ensemble de vos applications installées dans NextCloud avant d'effectuer la mise à jour.
13 changes: 7 additions & 6 deletions manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ ram.runtime = "512M"
sha256 = '91257ab5002d5d09da8d09d80389983330351c5c00a7e3a25b177bcea81171cc'

[resources.sources.32]
url = 'https://download.nextcloud.com/server/releases/nextcloud-32.0.7.tar.bz2'
sha256 = '450b4f2b26c83be4d7b8682229a7d868e2802fd54ae8f3ee6367618995637a76'
url = 'https://download.nextcloud.com/server/releases/nextcloud-32.0.8.tar.bz2'
sha256 = '58ad8ddf860d75a294b97a8e3e39562dec87ff650cb91c114589b3744ab1de0d'
prefetch = false

[resources.sources.31]
url = 'https://download.nextcloud.com/server/releases/nextcloud-31.0.13.tar.bz2'
sha256 = '92df08369467e81c23d7fd997afb756eae44ce47eff0c85c5d4d27212ebe283e'
url = 'https://download.nextcloud.com/server/releases/nextcloud-31.0.14.tar.bz2'
sha256 = 'd0965eb2cbf68105743cbbe6eef404c89092cf92c40daee2c9cb9cf6edf63613'
prefetch = false

[resources.sources.30]
Expand Down Expand Up @@ -141,6 +141,7 @@ ram.runtime = "512M"
"tar",
"smbclient",
"at",
"postgresql",
"mariadb-server",
"redis-server",
"php8.4-apcu",
Expand All @@ -157,6 +158,7 @@ ram.runtime = "512M"
"php8.4-ldap",
"php8.4-mbstring",
"php8.4-mysql",
"php8.4-pgsql",
"php8.4-redis",
"php8.4-sqlite3",
"php8.4-xml",
Expand All @@ -166,11 +168,10 @@ ram.runtime = "512M"

packages_from_raw_bash = """
case $YNH_DEBIAN_VERSION in
bullseye) echo libmagickcore-6.q16-6-extra ;;
bookworm) echo libmagickcore-6.q16-6-extra ;;
trixie) echo libmagickcore-7.q16-10-extra ;;
esac
"""

[resources.database]
type = "mysql"
type = "postgresql"
4 changes: 2 additions & 2 deletions patches/30/00-add-logout_url-conf.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ index d4d6a17db79..f587f805683 100644
$loginToken = $this->request->getCookie('nc_token');
+ $uuidUser = $this->userSession->getUser()->getUID();
+ $isLdapUser = $this->config->getUserValue($uuidUser, 'user_ldap', 'uid');
if (!is_null($loginToken)) {
- $this->config->deleteUserValue($this->userSession->getUser()->getUID(), 'login_token', $loginToken);
if ($loginToken !== null && $uid !== null) {
- $this->config->deleteUserValue($uid, 'login_token', $loginToken);
+ $this->config->deleteUserValue($uuidUser, 'login_token', $loginToken);
}
$this->userSession->logout();
Expand Down
3 changes: 1 addition & 2 deletions patches/main/00-add-logout_url-conf.patch
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ index 1a105130..9a51f8d9 100644
+ }
+
+ $response = new RedirectResponse($redirectUrl);

$this->session->set('clearingExecutionContexts', '1');
$this->session->close();

6 changes: 3 additions & 3 deletions scripts/backup
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ ynh_backup "/etc/cron.d/$app"
ynh_backup "/var/log/$app"

#=================================================
# BACKUP THE MYSQL DATABASE
# BACKUP THE POSTGRESQL DATABASE
#=================================================
ynh_print_info "Backing up the MySQL database..."
ynh_print_info "Backing up the PostgreSQL database..."

ynh_mysql_dump_db > db.sql
ynh_psql_dump_db > db.sql

#=================================================
# BACKUP THE NOTIFY_PUSH APP
Expand Down
1 change: 1 addition & 0 deletions scripts/change_url
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ then
# Reload PHP-FPM, necessary for force Nextcloud to re-read config.php, cf opcache.revalidate_freq
ynh_systemctl --service=php${php_version}-fpm --action=reload

mkdir -p /etc/nginx/conf.d/$new_domain.d/$app.d
mv /etc/nginx/conf.d/$old_domain.d/$app.d /etc/nginx/conf.d/$new_domain.d/$app.d
fi

Expand Down
2 changes: 1 addition & 1 deletion scripts/config
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ get__maintenance_mode() {
if echo $maintenance_mode_status | grep -q "disabled"
then
echo "0"
elif echo $maintenance_mode_status | grep -q "enabled"
elif echo "$maintenance_mode_status" | grep -q "enabled"
then
echo "1"
else
Expand Down
19 changes: 7 additions & 12 deletions scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,18 @@ source /usr/share/yunohost/helpers

ynh_app_setting_set_default --key=php_upload_max_filesize --value=10G
ynh_app_setting_set_default --key=php_memory_limit --value=512M

ynh_app_setting_set_default --key=fpm_footprint --value=high
ynh_app_setting_set_default --key=fpm_usage --value=medium
ynh_app_setting_set_default --key=enable_notify_push --value=0

phpflags="--define apc.enable_cli=1"
ynh_app_setting_set --key=phpflags --value="$phpflags"

ldap_email_attr="mail"

#=================================================
# CREATE A MYSQL DATABASE
#=================================================
ynh_script_progression "Migrate MySQL database to utf8..."

ynh_mysql_db_shell <<< "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"
enable_forward_email="0"
ynh_app_setting_set --key=enable_forward_email --value=0
ldap_email_attr="mail"

#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
Expand Down Expand Up @@ -79,7 +77,7 @@ admin_password="$(ynh_string_random --length=6)"

# Install Nextcloud using a temporary admin user
exec_occ maintenance:install \
--database "mysql" --database-name $db_name \
--database "pgsql" --database-name $db_name \
--database-user $db_user --database-pass "$db_pwd" \
--admin-user "admin" --admin-pass "$admin_password" \
--data-dir "$data_dir/data" \
Expand All @@ -90,9 +88,6 @@ exec_occ maintenance:install \
#=================================================
ynh_script_progression "Configuring $app..."

# Set the mysql.utf8mb4 config to true in config.php
exec_occ config:system:set mysql.utf8mb4 --type=boolean --value="true"

# move the logs from the data_dir to the standard /var/log
exec_occ config:system:set logfile --value="/var/log/$app/nextcloud.log"

Expand Down Expand Up @@ -180,7 +175,7 @@ exec_occ config:system:set overwrite.cli.url --value="https://${domain}${path}"
#=================================================

# Set the user as admin
ynh_mysql_db_shell <<< "INSERT INTO oc_group_user VALUES ('admin','$admin');"
ynh_psql_db_shell <<< "INSERT INTO oc_group_user VALUES ('admin','$admin');"

# And delete admin user
exec_occ user:delete admin
Expand Down
1 change: 0 additions & 1 deletion scripts/remove
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ if [ $enable_notify_push -eq 1 ]; then
fi

# Remove a cron file
# TODO: Ensure that cron job is not running (How !?)
ynh_safe_rm "/etc/cron.d/$app"

# Cleaning ACL in home directories
Expand Down
11 changes: 6 additions & 5 deletions scripts/restore
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ ynh_script_progression "Restoring data directory..."
ynh_restore "$data_dir"

#=================================================
# RESTORE THE MYSQL DATABASE
# RESTORE THE POSTGRESQL DATABASE
#=================================================
ynh_script_progression "Restoring the MySQL database..."
ynh_script_progression "Restoring the PostgreSQL database..."

ynh_mysql_db_shell < ./db.sql
ynh_psql_db_shell < ./db.sql

#=================================================
# RESTORE SYSTEM CONFIGURATIONS
Expand Down Expand Up @@ -83,6 +83,7 @@ ynh_script_progression "Adding multimedia directories..."

# Build YunoHost multimedia directories
ynh_multimedia_build_main_dir

# Allow nextcloud to write into these directories
ynh_multimedia_addaccess $app

Expand All @@ -97,8 +98,8 @@ ynh_restore "/etc/fail2ban/filter.d/$app.conf"
# Make sure a log file exists (mostly for CI tests)
logfile="/var/log/$app/nextcloud.log"
if [ ! -f "$logfile" ]; then
touch "$logfile"
chown "$app:" "$logfile"
touch "$logfile"
chown "$app:" "$logfile"
fi

ynh_systemctl --action=restart --service=fail2ban
Expand Down
61 changes: 50 additions & 11 deletions scripts/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ynh_app_setting_set_default --key=php_upload_max_filesize --value=10G
ynh_app_setting_set_default --key=php_memory_limit --value=512M

ynh_app_setting_set_default --key=enable_notify_push --value=0
ynh_app_setting_set_default --key=enable_forward_email --value=0

# Remove the option backup_core_only if it's in the settings.yml file
ynh_app_setting_delete --key=backup_core_only
Expand All @@ -37,6 +38,12 @@ filter_boring_occ_warnings() {
sed -E 's@\s*([0-9]+\/[0-9]+\s+\[(-|>|=)+\]\s+[0-9]+%|\s*Starting ...|Nextcloud or one of the apps require upgrade - only a limited number of commands are available|You may use your browser or the occ upgrade command to do the upgrade)@@g'
}

current_version=$(grep OC_VersionString "$install_dir/version.php" | cut -d\' -f2)
current_major_version=${current_version%%.*}

last_version=$(ynh_read_manifest "resources.sources.main.url" | grep -Eo '[0-9][0-9]\.[0-9]\.[0-9]+')
last_major_version=${last_version%%.*}

# Define a function to execute commands with `occ`
exec_occ() {
# Backward compatibility to upgrade from older versions
Expand Down Expand Up @@ -73,6 +80,44 @@ exec_occ() {
php$NEXTCLOUD_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") 2> >(filter_boring_occ_warnings >&2)
}

#=================================================
# HANDLE DATABASE MIGRATION FROM MYSL TO PSQL
#=================================================

# If the MySQL database is here, we should migrate
if mysql -e "USE $db_name" 2>/dev/null
then
# Migrate mysql db onto postgresql if the db is empty
if [[ "$(ynh_psql_db_shell "$db_name" <<< "\dt" 2>/dev/null | wc -l)" == "0" ]]
then
mysql_size=$(du -bs /var/lib/mysql/$app | awk '{print $1}')
mysql_size_human=$(du -hs /var/lib/mysql/$app | awk '{print $1}')
free_space=$(df --output=avail /var/lib/postgresql/*/main | tail -n1)
free_space=$((free_space * 1024))
[ $mysql_size -ge $free_space ] && ynh_die "Unable to migrate the database $app ($mysql_size_human) due to lack of free space."
ynh_print_info "Migrating to PostgreSQL database..."
ynh_hide_warnings exec_occ db:convert-type --all-apps --clear-schema pgsql $db_name 127.0.0.1 $db_name --password=$db_pwd -n
fi

# Remove mysql db if the postgresql db is not empty
if [[ "$(ynh_psql_db_shell "$db_name" <<< "\dt" 2>/dev/null | wc -l)" != "0" ]]
then
ynh_mysql_drop_db $db_name
nc_conf="${install_dir}/config/config.php"
# Verify the checksum and backup the file if it's different
ynh_backup_if_checksum_is_different "$install_dir/config/config.php"

ynh_write_var_in_file --file="$nc_conf" --key="dbtype" --value="pgsql"
ynh_write_var_in_file --file="$nc_conf" --key="dbuser" --value="$db_user"
ynh_write_var_in_file --file="$nc_conf" --key="dbpassword" --value="$db_pwd"
ynh_store_file_checksum "$nc_conf"
fi
fi

#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================

# Define a function to add an external storage
# Create the external storage for the given folders and enable sharing
create_external_storage() {
Expand Down Expand Up @@ -132,7 +177,7 @@ else
ldap_email_attr="mail"
fi

# Before NCv32, Yunohost was not using any prefix for the LDAP config.
# Before NCv32, YunoHost was not using any prefix for the LDAP config.
# This is now mandatory so we need to create a new config with a prefix.
if [ "${ldap_config_prefix:-}" = "" ]
then
Expand All @@ -150,15 +195,6 @@ chown -R $app:www-data "$install_dir"
# Print the current version number of Nextcloud
exec_occ -V

if [ "$(exec_occ config:system:get mysql.utf8mb4)" != "true" ]; then
db_pwd=$(ynh_app_setting_get --key=db_pwd)
# Change your databases character set and collation
ynh_mysql_db_shell <<< "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
# Take all apps enabled, and check if mail is one of them
# Then temporary disable the mail app
Expand Down Expand Up @@ -228,6 +264,7 @@ if [[ "$current_major_version" -le "$last_major_version" ]]; then
exec_occ -V
done
fi

exec_occ db:add-missing-indices -n
exec_occ db:add-missing-columns -n
exec_occ db:add-missing-primary-keys -n
Expand Down Expand Up @@ -279,6 +316,9 @@ ynh_safe_rm "$nc_conf"
# Migrating the mimetypes take a long time on larger instances
# so this is not done automatically during upgrades.
exec_occ maintenance:repair --include-expensive
# New indexes are sometimes added (by Nextcloud or installed applications)
# to improve database performance.
exec_occ db:add-missing-indices

#=================================================
# ALLOW USERS TO DISCONNECT FROM NEXTCLOUD
Expand Down Expand Up @@ -385,7 +425,6 @@ then
ynh_config_add --template="notify_push.conf" --destination="$nginx_extra_conf_dir/notify_push.conf"
fi

# Create a dedicated NGINX config
ynh_config_add_nginx

#=================================================
Expand Down