Make nextcloud server side encryption optional

This commit is contained in:
Bob Mottram 2018-05-15 10:50:54 +01:00
parent c5ce8cfcab
commit 9a72c76e23
1 changed files with 18 additions and 5 deletions

View File

@ -40,6 +40,7 @@ NEXTCLOUD_REPO="https://github.com/nextcloud/server"
# Stable 13 branch
NEXTCLOUD_COMMIT='edd5712c6ead5b09fa4f996cfda66fc4e18ba597'
NEXTCLOUD_ADMIN_PASSWORD=
NEXTCLOUD_SERVER_SIDE_ENCRYPTION=1
nextcloud_variables=(ONION_ONLY
NEXTCLOUD_DOMAIN_NAME
@ -83,6 +84,16 @@ function install_interactive_nextcloud {
ONION_ONLY='no'
fi
dialog --title $"Enable NextCloud server side encryption" \
--backtitle $"Freedombone Configuration" \
--yesno $"\\nDo you want to enable server side encryption. On ARM or older x86 systems, especially without HRNG, this may make performance excessively slow?" 10 60
sel=$?
case $sel in
1) NEXTCLOUD_SERVER_SIDE_ENCRYPTION=
;;
255) return;;
esac
if [[ $ONION_ONLY != "no" ]]; then
NEXTCLOUD_DOMAIN_NAME='nextcloud.local'
else
@ -668,12 +679,14 @@ function install_nextcloud_main {
sudo -u www-data ./occ check
sudo -u www-data ./occ status
sudo -u www-data ./occ app:list
if [ $NEXTCLOUD_SERVER_SIDE_ENCRYPTION ]; then
sudo -u www-data ./occ app:enable encryption
if ! sudo -u www-data ./occ encryption:enable; then
echo $'Encryption not enabled'
exit 73527
fi
sudo -u www-data ./occ encryption:status
fi
sudo -u www-data ./occ config:system:set appstoreenabled --value=false
chmod g+w "/var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs/config/config.php"
chown -R www-data:www-data "/var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs"