Skip to content

Commit 9d65011

Browse files
committed
nc-restore: also set tempdirectory
Signed-off-by: nachoparker <nacho@ownyourbits.com>
1 parent 21a791d commit 9d65011

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/ncp/BACKUPS/nc-restore.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ if [[ $( ls "$TMPDIR" | wc -l ) -eq $NUMFILES ]]; then
109109
}
110110
111111
echo "restore datadir to $DATADIR..."
112-
112+
113113
mkdir -p "$DATADIR"
114114
[[ "$( stat -fc%T "$DATADIR" )" == "btrfs" ]] && which btrfs &>/dev/null && {
115115
rmdir "$DATADIR" || exit 1
@@ -141,6 +141,7 @@ sed -i "s|^opcache.file_cache=.*|opcache.file_cache=$DATADIR/.opcache|" /etc/php
141141
# tmp upload dir
142142
mkdir -p "$DATADIR/tmp"
143143
chown www-data:www-data "$DATADIR/tmp"
144+
sudo -u www-data php occ config:system:set tempdirectory --value "$DATADIR/tmp"
144145
sed -i "s|^;\?upload_tmp_dir =.*$|upload_tmp_dir = $DATADIR/tmp|" /etc/php/${PHPVER}/cli/php.ini
145146
sed -i "s|^;\?upload_tmp_dir =.*$|upload_tmp_dir = $DATADIR/tmp|" /etc/php/${PHPVER}/fpm/php.ini
146147
sed -i "s|^;\?sys_temp_dir =.*$|sys_temp_dir = $DATADIR/tmp|" /etc/php/${PHPVER}/fpm/php.ini

0 commit comments

Comments
 (0)