mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Merge branch 'testing' into fix_logout_patch
This commit is contained in:
commit
eea1331320
7 changed files with 86 additions and 9 deletions
|
@ -5,7 +5,7 @@ Nextcloud for YunoHost
|
||||||
own data. A personal cloud which run on your own server. With Nextcloud
|
own data. A personal cloud which run on your own server. With Nextcloud
|
||||||
you can synchronize your files over your devices.
|
you can synchronize your files over your devices.
|
||||||
|
|
||||||
**Shipped version:** 13.0.1
|
**Shipped version:** 13.0.2
|
||||||
|
|
||||||
[](https://install-app.yunohost.org/?app=nextcloud)
|
[](https://install-app.yunohost.org/?app=nextcloud)
|
||||||

|

|
||||||
|
|
|
@ -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": "13.0.1~ynh1",
|
"version": "13.0.2~ynh1",
|
||||||
"url": "https://nextcloud.com",
|
"url": "https://nextcloud.com",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
|
@ -19,10 +19,12 @@ exec_occ() {
|
||||||
php occ --no-interaction --no-ansi "$@")
|
php occ --no-interaction --no-ansi "$@")
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create the external storage for the home folders and enable sharing
|
# Create the external storage for the given folders and enable sharing
|
||||||
create_home_external_storage() {
|
create_external_storage() {
|
||||||
|
local datadir="$1"
|
||||||
|
local mount_name="$2"
|
||||||
local mount_id=`exec_occ files_external:create --output=json \
|
local mount_id=`exec_occ files_external:create --output=json \
|
||||||
'Home' 'local' 'null::null' -c 'datadir=/home/$user' || true`
|
"$2" 'local' 'null::null' -c "datadir=$datadir" || true`
|
||||||
! [[ $mount_id =~ ^[0-9]+$ ]] \
|
! [[ $mount_id =~ ^[0-9]+$ ]] \
|
||||||
&& echo "Unable to create external storage" >&2 \
|
&& echo "Unable to create external storage" >&2 \
|
||||||
|| exec_occ files_external:option "$mount_id" enable_sharing true
|
|| exec_occ files_external:option "$mount_id" enable_sharing true
|
||||||
|
@ -315,3 +317,42 @@ ynh_handle_app_migration () {
|
||||||
migration_process=1
|
migration_process=1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# EXPERIMENTAL HELPERS
|
||||||
|
#=================================================
|
||||||
|
#=================================================
|
||||||
|
# YUNOHOST MULTIMEDIA INTEGRATION
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Install or update the main directory yunohost.multimedia
|
||||||
|
#
|
||||||
|
# usage: ynh_multimedia_build_main_dir
|
||||||
|
ynh_multimedia_build_main_dir () {
|
||||||
|
local ynh_media_release="v1.0"
|
||||||
|
local checksum="4852c8607db820ad51f348da0dcf0c88"
|
||||||
|
|
||||||
|
# Download yunohost.multimedia scripts
|
||||||
|
wget -nv https://github.com/YunoHost-Apps/yunohost.multimedia/archive/${ynh_media_release}.tar.gz
|
||||||
|
|
||||||
|
# Verify checksum
|
||||||
|
echo "${checksum} ${ynh_media_release}.tar.gz" | md5sum -c --status \
|
||||||
|
|| ynh_die "Corrupt source"
|
||||||
|
|
||||||
|
# Extract
|
||||||
|
mkdir yunohost.multimedia-master
|
||||||
|
tar -xf ${ynh_media_release}.tar.gz -C yunohost.multimedia-master --strip-components 1
|
||||||
|
./yunohost.multimedia-master/script/ynh_media_build.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
# Grant write access to multimedia directories to a specified user
|
||||||
|
#
|
||||||
|
# usage: ynh_multimedia_addaccess user_name
|
||||||
|
#
|
||||||
|
# | arg: user_name - User to be granted write access
|
||||||
|
ynh_multimedia_addaccess () {
|
||||||
|
local user_name=$1
|
||||||
|
groupadd -f multimedia
|
||||||
|
usermod -a -G multimedia $user_name
|
||||||
|
}
|
||||||
|
|
|
@ -182,7 +182,7 @@ exec_occ ldap:test-config \'\' \
|
||||||
# Enable External Storage and create local mount to home folder
|
# Enable External Storage and create local mount to home folder
|
||||||
if [ $user_home -eq 1 ]; then
|
if [ $user_home -eq 1 ]; then
|
||||||
exec_occ app:enable files_external
|
exec_occ app:enable files_external
|
||||||
create_home_external_storage
|
create_external_storage "/home/\$user" "Home"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -237,6 +237,19 @@ exec_occ background:cron
|
||||||
# Set system group in hooks
|
# Set system group in hooks
|
||||||
ynh_replace_string "#GROUP#" "$app" ../hooks/post_user_create
|
ynh_replace_string "#GROUP#" "$app" ../hooks/post_user_create
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# YUNOHOST MULTIMEDIA INTEGRATION
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -134,6 +134,15 @@ for u in $(ynh_user_list); do
|
||||||
setfacl -m g:$app:rwx "/home/$u" || true
|
setfacl -m g:$app:rwx "/home/$u" || true
|
||||||
done
|
done
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# YUNOHOST MULTIMEDIA INTEGRATION
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Build YunoHost multimedia directories
|
||||||
|
ynh_multimedia_build_main_dir
|
||||||
|
# Allow nextcloud to write into these directories
|
||||||
|
ynh_multimedia_addaccess $app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -270,7 +270,7 @@ if [ $user_home -eq 1 ]; then
|
||||||
exec_occ app:enable files_external
|
exec_occ app:enable files_external
|
||||||
exec_occ files_external:list --output=json \
|
exec_occ files_external:list --output=json \
|
||||||
| grep -q '"storage":"\\\\OC\\\\Files\\\\Storage\\\\Local"' \
|
| grep -q '"storage":"\\\\OC\\\\Files\\\\Storage\\\\Local"' \
|
||||||
|| create_home_external_storage
|
|| create_external_storage "/home/\$user" "Home"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -301,6 +301,19 @@ exec_occ background:cron
|
||||||
# Set system group in hooks
|
# Set system group in hooks
|
||||||
ynh_replace_string "#GROUP#" "$app" ../hooks/post_user_create
|
ynh_replace_string "#GROUP#" "$app" ../hooks/post_user_create
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# YUNOHOST MULTIMEDIA INTEGRATION
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Last available nextcloud version
|
# Last available nextcloud version
|
||||||
next_version="13.0.1"
|
next_version="13.0.2"
|
||||||
|
|
||||||
# Nextcloud tarball checksum sha256
|
# Nextcloud tarball checksum sha256
|
||||||
nextcloud_source_sha256="5743314a71e972ae46a14b36b37394d4545915aa5f32d9e12ba786d04c1f1d11"
|
nextcloud_source_sha256="7396f98a1a53a9f4b144f55360d87c89cb6ee899feef1cfbf29a736219f9c47d"
|
||||||
|
|
||||||
# Patch nextcloud files only for the last version
|
# Patch nextcloud files only for the last version
|
||||||
cp -a ../sources/patches_last_version/* ../sources/patches
|
cp -a ../sources/patches_last_version/* ../sources/patches
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue