Browse Source

[enh] Create as needed local home mount with External Storage

pull/4/head
Jérôme Lebleu 10 years ago
parent
commit
c02d6c39dd
  1. 2
      README.md
  2. 6
      scripts/install
  3. 8
      scripts/upgrade

2
README.md

@ -41,8 +41,6 @@ Again, upgrading from the current official package should be used for testing on
## TODO ## 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? * Add a *clean* argument to the remove script to delete data folder?
* ... * ...

6
scripts/install

@ -104,7 +104,6 @@ _exec_occ maintenance:install \
|| die "Unable to install ownCloud" || die "Unable to install ownCloud"
# Enable plugins and set ownCloud configuration # Enable plugins and set ownCloud configuration
_exec_occ app:enable files_external
_exec_occ app:enable user_ldap _exec_occ app:enable user_ldap
_exec_occ ldap:create-empty-config _exec_occ ldap:create-empty-config
_exec_occ config:import "$oc_conf" _exec_occ config:import "$oc_conf"
@ -114,6 +113,11 @@ sudo rm -f "$oc_conf"
_exec_occ ldap:test-config \'\' \ _exec_occ ldap:test-config \'\' \
|| die "An error occured during LDAP configuration" || 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 # Add dynamic logout URL to the config
_exec_occ config:system:get logout_url >/dev/null 2>&1 \ _exec_occ config:system:get logout_url >/dev/null 2>&1 \
|| sudo su -c "echo \" || sudo su -c "echo \"

8
scripts/upgrade

@ -98,11 +98,17 @@ _exec_occ upgrade \
|| ([[ $? -eq 3 ]] || die "Unable to upgrade ownCloud") || ([[ $? -eq 3 ]] || die "Unable to upgrade ownCloud")
# Enable plugins and set ownCloud configuration # Enable plugins and set ownCloud configuration
_exec_occ app:enable files_external
_exec_occ app:enable user_ldap _exec_occ app:enable user_ldap
_exec_occ config:import "$oc_conf" _exec_occ config:import "$oc_conf"
sudo rm -f "$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 # Add dynamic logout URL to the config
# TODO: if changes are made to this section, replace it with new one. # TODO: if changes are made to this section, replace it with new one.
_exec_occ config:system:get logout_url >/dev/null 2>&1 \ _exec_occ config:system:get logout_url >/dev/null 2>&1 \

Loading…
Cancel
Save