Implementation of https://github.com/syncloud/owncloud-setup/issues/28