mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Update _common.sh
This commit is contained in:
parent
9bf0228738
commit
6eb29b1d71
1 changed files with 0 additions and 13 deletions
|
@ -8,19 +8,6 @@
|
||||||
# EXPERIMENTAL HELPERS
|
# EXPERIMENTAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# 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/data" || true`
|
|
||||||
! [[ $mount_id =~ ^[0-9]+$ ]] \
|
|
||||||
&& ynh_print_warn --message="Unable to create external storage" \
|
|
||||||
|| exec_occ files_external:option "$mount_id" enable_sharing true
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Check if an URL is already handled
|
# Check if an URL is already handled
|
||||||
# usage: is_url_handled --domain=DOMAIN --path=PATH_URI
|
# usage: is_url_handled --domain=DOMAIN --path=PATH_URI
|
||||||
is_url_handled() {
|
is_url_handled() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue