Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing #224

Merged
merged 8 commits into from Oct 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -12,7 +12,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
own data. A personal cloud which run on your own server. With Nextcloud
you can synchronize your files over your devices.

**Shipped version:** 15.0.10
**Shipped version:** 15.0.11

## Screenshots

Expand Down
5 changes: 4 additions & 1 deletion conf/php-fpm.conf
Expand Up @@ -433,7 +433,10 @@ env[PATH] = $PATH
php_value[upload_max_filesize] = 10G
php_value[post_max_size] = 10G
php_value[default_charset] = UTF-8
php_value[opcache.enable]=1
; OPcache is already activated by default
; php_value[opcache.enable]=1
; The following parameters are nevertheless recommended for Nextcloud
; see here: https://docs.nextcloud.com/server/15/admin_manual/installation/server_tuning.html#enable-php-opcache
php_value[opcache.enable_cli]=1
php_value[opcache.interned_strings_buffer]=8
php_value[opcache.max_accelerated_files]=10000
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Expand Up @@ -6,7 +6,7 @@
"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"
},
"version": "15.0.10~ynh1",
"version": "15.0.11~ynh1",
"url": "https://nextcloud.com",
"license": "AGPL-3.0",
"maintainer": {
Expand Down
41 changes: 20 additions & 21 deletions scripts/upgrade
Expand Up @@ -176,23 +176,34 @@ ynh_install_app_dependencies $pkg_dependencies
# VERSION TO THE NEXT ONE
#=================================================

# Define a function to execute commands with `occ`
exec_occ() {
(cd "$final_path" && exec_as "$app" \
php 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
}
# Define app's data directory
datadir="/home/yunohost.app/$app/data"

if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading nextcloud..." --weight=3

# Define a function to execute commands with `occ`
exec_occ() {
(cd "$final_path" && exec_as "$app" \
php occ --no-interaction --no-ansi "$@")
}

# Load the last available version
source upgrade.d/upgrade.last.sh
last_version=$next_version

# Define app's data directory
datadir="/home/yunohost.app/$app/data"

# Set write access for the following commands
chown -R $app: "$final_path" "$datadir"

Expand Down Expand Up @@ -323,18 +334,6 @@ then
# MOUNT HOME FOLDERS AS EXTERNAL STORAGE
#=================================================

# 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
}

# Enable External Storage and create local mount to home folder as needed
if [ $user_home -eq 1 ]; then
exec_occ app:enable files_external
Expand Down
4 changes: 2 additions & 2 deletions scripts/upgrade.d/upgrade.last.sh
@@ -1,10 +1,10 @@
#!/bin/bash

# Last available nextcloud version
next_version="15.0.10"
next_version="15.0.11"

# Nextcloud tarball checksum sha256
nextcloud_source_sha256="494511fcda6e823e8dfb571fcf3b9ddc433148449acb080104f4165d2f2f4d43"
nextcloud_source_sha256="59cdde8e7a4a15606efc246e37adf6401b0b4a60f33289be8725d675b9c2ae26"

# This function will only be executed upon applying the last upgrade referenced above
last_upgrade_operations () {
Expand Down