diff --git a/README.md b/README.md index 5216bfd..a28b85b 100644 --- a/README.md +++ b/README.md @@ -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? * ... diff --git a/scripts/install b/scripts/install index 817496b..c7588d5 100755 --- a/scripts/install +++ b/scripts/install @@ -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 \" diff --git a/scripts/upgrade b/scripts/upgrade index 6f4af8c..e747bc7 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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 \