diff --git a/bin/ncp-update-nc b/bin/ncp-update-nc index 28fa51825..7d1930276 100755 --- a/bin/ncp-update-nc +++ b/bin/ncp-update-nc @@ -165,7 +165,7 @@ rollback() { rm -rf /var/www/nextcloud.tar.bz2 "$BASEDIR"/nextcloud-old echo "Rolling back to backup $BKP..." local TMPDATA - TMPDATA="$( mktemp -d "/var/www/ncp-data.XXXXXX" )" || { echo "Failed to create temp dir" >&2; exit 1; } + TMPDATA="$( mktemp -d "$BASEDIR/recovery/ncp-data.XXXXXX" )" || { echo "Failed to create temp dir" >&2; exit 1; } [[ "$DATADIR" == "$BASEDIR/nextcloud/data" ]] && mv -T "$DATADIR" "$TMPDATA" ncp-restore "$BKP" || { echo "Rollback failed! Data left at $TMPDATA"; exit 1; } [[ "$DATADIR" == "$BASEDIR/nextcloud/data" ]] && { rm -rf "$DATADIR"; mv -T "$TMPDATA" "$DATADIR"; }