mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
[enh] Create as needed local home mount with External Storage
This commit is contained in:
parent
2dfd4b482c
commit
c02d6c39dd
3 changed files with 12 additions and 4 deletions
|
@ -41,8 +41,6 @@ Again, upgrading from the current official package should be used for testing on
|
|||
|
||||
## TODO
|
||||
|
||||
* Update the external storage plugin configuration - see
|
||||
[here](https://doc.owncloud.org/server/9.0/admin_manual/configuration_server/occ_command.html#files-external-label)
|
||||
* Add a *clean* argument to the remove script to delete data folder?
|
||||
* ...
|
||||
|
||||
|
|
|
@ -104,7 +104,6 @@ _exec_occ maintenance:install \
|
|||
|| die "Unable to install ownCloud"
|
||||
|
||||
# Enable plugins and set ownCloud configuration
|
||||
_exec_occ app:enable files_external
|
||||
_exec_occ app:enable user_ldap
|
||||
_exec_occ ldap:create-empty-config
|
||||
_exec_occ config:import "$oc_conf"
|
||||
|
@ -114,6 +113,11 @@ sudo rm -f "$oc_conf"
|
|||
_exec_occ ldap:test-config \'\' \
|
||||
|| die "An error occured during LDAP configuration"
|
||||
|
||||
# Enable External Storage and create local mount
|
||||
_exec_occ app:enable files_external
|
||||
_exec_occ files_external:create \
|
||||
'Home' 'local' 'null::null' -c 'datadir=/home/$user'
|
||||
|
||||
# Add dynamic logout URL to the config
|
||||
_exec_occ config:system:get logout_url >/dev/null 2>&1 \
|
||||
|| sudo su -c "echo \"
|
||||
|
|
|
@ -98,11 +98,17 @@ _exec_occ upgrade \
|
|||
|| ([[ $? -eq 3 ]] || die "Unable to upgrade ownCloud")
|
||||
|
||||
# Enable plugins and set ownCloud configuration
|
||||
_exec_occ app:enable files_external
|
||||
_exec_occ app:enable user_ldap
|
||||
_exec_occ config:import "$oc_conf"
|
||||
sudo rm -f "$oc_conf"
|
||||
|
||||
# Enable External Storage and create local mount as needed
|
||||
_exec_occ app:enable files_external
|
||||
_exec_occ files_external:list --output=json \
|
||||
| grep -q '"storage":"\\\\OC\\\\Files\\\\Storage\\\\Local"' \
|
||||
|| _exec_occ files_external:create \
|
||||
'Home' 'local' 'null::null' -c 'datadir=/home/$user'
|
||||
|
||||
# Add dynamic logout URL to the config
|
||||
# TODO: if changes are made to this section, replace it with new one.
|
||||
_exec_occ config:system:get logout_url >/dev/null 2>&1 \
|
||||
|
|
Loading…
Add table
Reference in a new issue