diff options
author | nachoparker <nacho@ownyourbits.com> | 2017-05-27 12:59:32 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2017-05-27 12:59:37 +0300 |
commit | b428b0f876170aec32d9e61d2728cdf93167caaa (patch) | |
tree | 194c9f2999acb2eb5ef3feef08a300de9a50ee14 | |
parent | 2a58cc2536845e477088b04c687dc2cede90dfa7 (diff) |
nc-datadir: move .opcache location toov0.12.9
-rwxr-xr-x | etc/nextcloudpi-config.d/nc-automount.sh | 2 | ||||
-rw-r--r-- | etc/nextcloudpi-config.d/nc-datadir.sh | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/etc/nextcloudpi-config.d/nc-automount.sh b/etc/nextcloudpi-config.d/nc-automount.sh index 9f2d49ce..d3ab2930 100755 --- a/etc/nextcloudpi-config.d/nc-automount.sh +++ b/etc/nextcloudpi-config.d/nc-automount.sh @@ -27,7 +27,7 @@ show_info() on boot or at the moment of insertion. Format your drive as ext4 in order to move NC datafolder or database -VFAT or NTFS is not recommended and will not work without hackery +VFAT or NTFS is not recommended for this task, as it does not suport permissions IMPORTANT: halt or umount the drive before extracting" \ 20 90 diff --git a/etc/nextcloudpi-config.d/nc-datadir.sh b/etc/nextcloudpi-config.d/nc-datadir.sh index bf2883a3..eeb8dd12 100644 --- a/etc/nextcloudpi-config.d/nc-datadir.sh +++ b/etc/nextcloudpi-config.d/nc-datadir.sh @@ -30,6 +30,7 @@ because they do not provide a compatible user/permissions system" \ configure() { + ## CHECKS local SRCDIR=$( cd /var/www/nextcloud; sudo -u www-data php occ config:system:get datadirectory ) [ -d $SRCDIR ] || { echo -e "data directory $SRCDIR not found"; return 1; } @@ -51,6 +52,7 @@ configure() [[ $( stat -fc%d / ) == $( stat -fc%d $BASEDIR ) ]] && \ echo -e "INFO: moving data dir to another place in the same SD card\nIf you want to use an external mount, make sure it is properly set up" + ## COPY service apache2 stop cp -ra "$SRCDIR" "$DATADIR_" || return 1 @@ -60,6 +62,9 @@ configure() chown www-data:www-data "$DATADIR_/tmp" sed -i "s|^;\?upload_tmp_dir =.*$|upload_tmp_dir = $DATADIR_/tmp|" /etc/php/7.0/fpm/php.ini + # opcache dir + sed -i "s|^opcache.file_cache=.*|opcache.file_cache=$DATADIR_/.opcache|" /etc/php/7.0/mods-available/opcache.ini + # datadir cd /var/www/nextcloud sudo -u www-data php occ config:system:set datadirectory --value=$DATADIR_ |