Skip to content

Commit

Permalink
nc-datadir: also use tempdirectory setting
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Dec 1, 2018
1 parent 845cff1 commit d19a7f7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
6 changes: 5 additions & 1 deletion changelog.md
@@ -1,5 +1,9 @@

[v0.67.3](https://github.com/nextcloud/nextcloudpi/commit/d3c72cc) (2018-11-26) nc-datadir: shorten short description
[v0.67.5](https://github.com/nextcloud/nextcloudpi/commit/5ef27fb) (2018-12-01) nc-datadir: also use tempdirectory setting

[v0.67.4 ](https://github.com/nextcloud/nextcloudpi/commit/88d9fe2) (2018-11-26) nc-restore: check that we are in linux fs

[v0.67.3 ](https://github.com/nextcloud/nextcloudpi/commit/5278bfd) (2018-11-26) nc-datadir: shorten short description

[v0.67.2 ](https://github.com/nextcloud/nextcloudpi/commit/5e4be44) (2018-11-26) change dialog text width to 120

Expand Down
1 change: 1 addition & 0 deletions etc/ncp-config.d/nc-datadir.sh
Expand Up @@ -95,6 +95,7 @@ configure()
# tmp upload dir
mkdir -p "$DATADIR_/tmp"
chown www-data:www-data "$DATADIR_/tmp"
sudo -u www-data php occ config:system:set tempdirectory "$DATADIR_/tmp"
sed -i "s|^;\?upload_tmp_dir =.*$|upload_tmp_dir = $DATADIR_/tmp|" /etc/php/${PHPVER}/cli/php.ini
sed -i "s|^;\?upload_tmp_dir =.*$|upload_tmp_dir = $DATADIR_/tmp|" /etc/php/${PHPVER}/fpm/php.ini
sed -i "s|^;\?sys_temp_dir =.*$|sys_temp_dir = $DATADIR_/tmp|" /etc/php/${PHPVER}/fpm/php.ini
Expand Down
10 changes: 10 additions & 0 deletions etc/ncp-config.d/nc-init.sh
Expand Up @@ -101,6 +101,16 @@ EOF
);
EOF

# tmp upload dir
local UPLOADTMPDIR=/var/www/nextcloud/data/tmp
mkdir -p "$UPLOADTMPDIR"
chown www-data:www-data "$UPLOADTMPDIR"
sudo -u www-data php occ config:system:set tempdirectory "$UPLOADTMPDIR"
sed -i "s|^;\?upload_tmp_dir =.*$|upload_tmp_dir = $UPLOADTMPDIR|" /etc/php/${PHPVER}/cli/php.ini
sed -i "s|^;\?upload_tmp_dir =.*$|upload_tmp_dir = $UPLOADTMPDIR|" /etc/php/${PHPVER}/fpm/php.ini
sed -i "s|^;\?sys_temp_dir =.*$|sys_temp_dir = $UPLOADTMPDIR|" /etc/php/${PHPVER}/fpm/php.ini


# 4 Byte UTF8 support
sudo -u www-data php occ config:system:set mysql.utf8mb4 --type boolean --value="true"

Expand Down
9 changes: 0 additions & 9 deletions etc/ncp-config.d/nc-nextcloud.sh
Expand Up @@ -235,15 +235,6 @@ EOF
sed -i "s/upload_max_filesize=.*/upload_max_filesize=$MAXFILESIZE_/" /var/www/nextcloud/.user.ini
sed -i "s/memory_limit=.*/memory_limit=$MEMORYLIMIT_/" /var/www/nextcloud/.user.ini

# TMP UPLOAD DIR
local UPLOADTMPDIR=/var/www/nextcloud/data/tmp
mkdir -p "$UPLOADTMPDIR"
chown www-data:www-data "$UPLOADTMPDIR"
sed -i "s|^;\?upload_tmp_dir =.*$|upload_tmp_dir = $UPLOADTMPDIR|" /etc/php/${PHPVER}/cli/php.ini
sed -i "s|^;\?upload_tmp_dir =.*$|upload_tmp_dir = $UPLOADTMPDIR|" /etc/php/${PHPVER}/fpm/php.ini
sed -i "s|^;\?sys_temp_dir =.*$|sys_temp_dir = $UPLOADTMPDIR|" /etc/php/${PHPVER}/fpm/php.ini


# slow transfers will be killed after this time
cat >> /var/www/nextcloud/.user.ini <<< "max_execution_time=$MAXTRANSFERTIME_"
cat >> /var/www/nextcloud/.user.ini <<< "max_input_time=$MAXTRANSFERTIME_"
Expand Down

0 comments on commit d19a7f7

Please sign in to comment.