mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Merge branch 'testing' into enh-faster-permissions-setter
This commit is contained in:
commit
f0f71baf2d
4 changed files with 14 additions and 6 deletions
|
@ -9,7 +9,7 @@ location ^~ /.well-known {
|
||||||
location = /.well-known/carddav { return 301 __PATH__/remote.php/dav/; }
|
location = /.well-known/carddav { return 301 __PATH__/remote.php/dav/; }
|
||||||
location = /.well-known/caldav { return 301 __PATH__/remote.php/dav/; }
|
location = /.well-known/caldav { return 301 __PATH__/remote.php/dav/; }
|
||||||
|
|
||||||
location = /.well-known/webfinger { return 301 __PATH__/index.php$uri; }
|
location = /.well-known/webfinger { return 301 __PATH__/index.php$request_uri; }
|
||||||
location = /.well-known/nodeinfo { return 301 __PATH__/index.php$uri; }
|
location = /.well-known/nodeinfo { return 301 __PATH__/index.php$uri; }
|
||||||
|
|
||||||
# Let Nextcloud's API for `/.well-known` URIs handle all other
|
# Let Nextcloud's API for `/.well-known` URIs handle all other
|
||||||
|
|
|
@ -49,6 +49,14 @@ then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# SETUP SSOWAT
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring permissions..."
|
||||||
|
|
||||||
|
# Temporary fix for the API permission
|
||||||
|
ynh_permission_url --permission="api" --url="re:$new_domain\/.well-known\/.*" --auth_header="false" --clear_urls
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -160,10 +160,10 @@ exec_occ ldap:test-config '' \
|
||||||
# Define a function to add an external storage
|
# Define a function to add an external storage
|
||||||
# Create the external storage for the given folders and enable sharing
|
# Create the external storage for the given folders and enable sharing
|
||||||
create_external_storage() {
|
create_external_storage() {
|
||||||
local datadir="$1"
|
local mount_dir="$1"
|
||||||
local mount_name="$2"
|
local mount_name="$2"
|
||||||
local mount_id=`exec_occ files_external:create --output=json \
|
local mount_id=`exec_occ files_external:create --output=json \
|
||||||
"$mount_name" 'local' 'null::null' -c "datadir=$data_dir/data" || true`
|
"$mount_name" 'local' 'null::null' -c "datadir=$mount_dir" || true`
|
||||||
! [[ $mount_id =~ ^[0-9]+$ ]] \
|
! [[ $mount_id =~ ^[0-9]+$ ]] \
|
||||||
&& ynh_print_warn --message="Unable to create external storage" \
|
&& ynh_print_warn --message="Unable to create external storage" \
|
||||||
|| exec_occ files_external:option "$mount_id" enable_sharing true
|
|| exec_occ files_external:option "$mount_id" enable_sharing true
|
||||||
|
|
|
@ -119,7 +119,7 @@ exec_occ() {
|
||||||
fi
|
fi
|
||||||
if ! timeout 1 php$NEXTCLOUD_PHP_VERSION 2>/dev/null; then
|
if ! timeout 1 php$NEXTCLOUD_PHP_VERSION 2>/dev/null; then
|
||||||
local pkg_dependencies="$(dpkg-query --show --showformat='${Depends}' ${app}-ynh-deps)"
|
local pkg_dependencies="$(dpkg-query --show --showformat='${Depends}' ${app}-ynh-deps)"
|
||||||
pkg_dependencies="${pkg_dependencies/$phpversion/$NEXTCLOUD_PHP_VERSION}"
|
pkg_dependencies="${pkg_dependencies//$phpversion/$NEXTCLOUD_PHP_VERSION}"
|
||||||
ynh_install_app_dependencies "$pkg_dependencies"
|
ynh_install_app_dependencies "$pkg_dependencies"
|
||||||
fi
|
fi
|
||||||
(cd "$install_dir" && ynh_exec_as "$app" \
|
(cd "$install_dir" && ynh_exec_as "$app" \
|
||||||
|
@ -129,10 +129,10 @@ exec_occ() {
|
||||||
# Define a function to add an external storage
|
# Define a function to add an external storage
|
||||||
# Create the external storage for the given folders and enable sharing
|
# Create the external storage for the given folders and enable sharing
|
||||||
create_external_storage() {
|
create_external_storage() {
|
||||||
local datadir="$1"
|
local mount_dir="$1"
|
||||||
local mount_name="$2"
|
local mount_name="$2"
|
||||||
local mount_id=$(exec_occ files_external:create --output=json \
|
local mount_id=$(exec_occ files_external:create --output=json \
|
||||||
"$mount_name" 'local' 'null::null' -c "datadir=$data_dir/data" || true)
|
"$mount_name" 'local' 'null::null' -c "datadir=$mount_dir" || true)
|
||||||
! [[ $mount_id =~ ^[0-9]+$ ]] \
|
! [[ $mount_id =~ ^[0-9]+$ ]] \
|
||||||
&& ynh_print_warn --message="Unable to create external storage" \
|
&& ynh_print_warn --message="Unable to create external storage" \
|
||||||
|| exec_occ files_external:option "$mount_id" enable_sharing true
|
|| exec_occ files_external:option "$mount_id" enable_sharing true
|
||||||
|
|
Loading…
Add table
Reference in a new issue